mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.1.2141: Truncation when serializing libsodium encryption parameters
Problem: Truncation when serializing libsodium encryption parameters. Solution: Correctly cast to long long type (Yasuhiro Matsumoto). fixes: #19248 closes: #19357 Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
b422a33ac2
commit
60e93b5de7
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2026 Feb 07
|
||||
*version9.txt* For Vim version 9.1. Last change: 2026 Feb 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -52528,4 +52528,8 @@ Problem: tests: Test_wayland_protocol_error_overflow() fails
|
||||
(after v9.1.2139)
|
||||
Solution: try/catch the expected error
|
||||
|
||||
Patch 9.1.2141
|
||||
Problem: Truncation when serializing libsodium encryption parameters.
|
||||
Solution: Correctly cast to long long type (Yasuhiro Matsumoto).
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual:nofoldenable
|
||||
|
||||
+2
-2
@@ -1356,7 +1356,7 @@ crypt_long_long_to_char(long long n, char_u *s)
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
s[i] = (char_u)(n & 0xff);
|
||||
n = (unsigned)n >> 8;
|
||||
n = (unsigned long long)n >> 8;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1367,7 +1367,7 @@ crypt_int_to_char(int n, char_u *s)
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
s[i] = (char_u)(n & 0xff);
|
||||
n = (unsigned)n >> 8;
|
||||
n = (unsigned long long)n >> 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2141,
|
||||
/**/
|
||||
2140,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user