Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8420 +/- ##
==========================================
+ Coverage 89.81% 89.86% +0.05%
==========================================
Files 149 149
Lines 167792 166178 -1614
==========================================
- Hits 150707 149341 -1366
+ Misses 17085 16837 -248
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
The inplace encoding and decoding functions using xchacha20 are not actually used. The actual buffer will be en/decoded using the crypt_sodium_buffer_encode/decode() function, which buffers the input (to be able to add padding and the MAC). Those inplace encoding functions would be used for handling the swap and undo file. However, since those features are currently explicitly disabled, comment out those functions. The code will be kept, just in case we will ever make swapfile or undo file encoding work :/ This should at least gain us some coverage, since there is currently no way to test those functions.
To correctly calculate the block size for reading a file, we need to know what metadata is added in addition to the payload. Instead of hard-coding the used header-length, let's calculate the maximum needed header length for all available crypt methods and use that one.
Fix the Coverity issues 1486250 and 1486249 by checking whether a length has been specified or not, and only if one was given, access the actual buffer pointer.
Only disable the swapfile, if the key option for a given buffer has been set. Do not disable it just because the cryptmethod was set.
The error messages "Corrupted chunk" may be misleading, since it is also given when a wrong password was entered. So simply drop that part and only output that the decryption failed.
fixes vim#8411 add the include directory to the CFLAGS variable, instead of the $INCL variable. Also fix a typo for the 32bit includes and finally change the Include switch to use `/I` instead of `-I`, quoting the sodium directory.
8cb8902 to
931ebc6
Compare
Member
Author
|
amended to fix test failures and also fix a conversion warning from MSVC |
Contributor
|
Some code is disabled with "#if 0", was that for testing/debugging? |
Contributor
|
ah, I see the "Currently unused," comment applies to that. |
janlazo
added a commit
to janlazo/neovim
that referenced
this pull request
Jul 31, 2021
Problem: Location list only has the start position.
Solution: Make it possible to add an end position. (Shane-XB-Qian,
closes vim/vim#8393)
vim/vim@6864efa
N/A patches for version.c:
vim-patch:8.2.3002: Vim doesn't abort on a fatal Tcl error
Problem: Vim doesn't abort on a fatal Tcl error.
Solution: Change emsg() to iemsg(). (Dominique Pellé, closes vim/vim#8383)
vim/vim@affd0bc
vim-patch:8.2.3030: Coverity reports a memory leak
Problem: Coverity reports a memory leak.
Solution: Fix the leak and a few typos. (Dominique Pellé, closes vim/vim#8418)
vim/vim@cb54bc6
Patch v8.2.3022 is mostly N/A but cannot be included here
because of new feature check for "has()".
vim-patch:8.2.3032: build problems with MSVC, other crypt issues with libsodium
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 vim/vim#8420, closes vim/vim#8411)
vim/vim@226b28b
vim-patch:8.2.3044: Amiga MorphOS and AROS: process ID is not valid
Problem: Amiga MorphOS and AROS: process ID is not valid.
Solution: Use FindTask to return something which is unique to all processes.
(Ola Söder, closes vim/vim#8444)
vim/vim@3a62b14
vim-patch:8.2.3046: Amiga MorphOS: Term mode is set using DOS packets
Problem: Amiga MorphOS: Term mode is set using DOS packets.
Solution: Use the same way of setting term mdoe on all next gen Amiga-like
systems. (Ola Söder, closes vim/vim#8445)
vim/vim@b420ac9
lewis6991
pushed a commit
to lewis6991/neovim
that referenced
this pull request
Dec 12, 2021
Problem: Location list only has the start position.
Solution: Make it possible to add an end position. (Shane-XB-Qian,
closes vim/vim#8393)
vim/vim@6864efa
N/A patches for version.c:
vim-patch:8.2.3002: Vim doesn't abort on a fatal Tcl error
Problem: Vim doesn't abort on a fatal Tcl error.
Solution: Change emsg() to iemsg(). (Dominique Pellé, closes vim/vim#8383)
vim/vim@affd0bc
vim-patch:8.2.3030: Coverity reports a memory leak
Problem: Coverity reports a memory leak.
Solution: Fix the leak and a few typos. (Dominique Pellé, closes vim/vim#8418)
vim/vim@cb54bc6
Patch v8.2.3022 is mostly N/A but cannot be included here
because of new feature check for "has()".
vim-patch:8.2.3032: build problems with MSVC, other crypt issues with libsodium
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 vim/vim#8420, closes vim/vim#8411)
vim/vim@226b28b
vim-patch:8.2.3044: Amiga MorphOS and AROS: process ID is not valid
Problem: Amiga MorphOS and AROS: process ID is not valid.
Solution: Use FindTask to return something which is unique to all processes.
(Ola Söder, closes vim/vim#8444)
vim/vim@3a62b14
vim-patch:8.2.3046: Amiga MorphOS: Term mode is set using DOS packets
Problem: Amiga MorphOS: Term mode is set using DOS packets.
Solution: Use the same way of setting term mdoe on all next gen Amiga-like
systems. (Ola Söder, closes vim/vim#8445)
vim/vim@b420ac9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some more or less small fixes for using libsodium:
keyoption is set