diff options
author | Christian Brabandt <cb@256bit.org> | 2021-06-21 21:08:08 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-21 21:08:08 +0200 |
commit | 226b28b96150e59375d2bff44e0aadd382b0c3f1 (patch) | |
tree | ca0225ef8907a75b2dcc0296f0378939bb53cb21 /src/fileio.c | |
parent | 22f17a29cd0b0cc3107dc6cd1d96c62eee52a7d9 (diff) |
patch 8.2.3032: build problems with MSVC, other crypt issues with libsodiumv8.2.3032
Problem: Build problems with MSVC, other crypt issues with libsodium.
Solution: Adjust MSVC makefile. Disable swap file only when 'key' is set.
Adjust error message used when key is wrong. Fix Coverity issues.
(Christian Brabandt, closes #8420, closes #8411)
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index e05dfa3a5d..7c8f00de3a 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; |