summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index e05dfa3a5..7c8f00de3 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1213,6 +1213,7 @@ retry:
* Read bytes from curbuf. Used for converting text read
* from stdin.
*/
+ eof = FALSE;
if (read_buf_lnum > from)
size = 0;
else
@@ -1261,6 +1262,7 @@ retry:
if (!curbuf->b_p_eol)
--tlen;
size = tlen;
+ eof = TRUE;
break;
}
}
@@ -1276,7 +1278,7 @@ retry:
// Let the crypt layer work with a buffer size of 8192
if (filesize == 0)
// set size to 8K + Sodium Crypt Metadata
- size = WRITEBUFSIZE + 36
+ size = WRITEBUFSIZE + crypt_get_max_header_len()
+ crypto_secretstream_xchacha20poly1305_HEADERBYTES
+ crypto_secretstream_xchacha20poly1305_ABYTES;