mirror of
https://github.com/neovim/neovim.git
synced 2024-12-21 03:35:02 -07:00
vim-patch:7.4.2349 (#6368)
Problem: Valgrind reports using uninitialzed memory. (Dominique Pelle)
Solution: Check the length before checking for a NUL.
2321ca2a78
This commit is contained in:
parent
43a99f77a8
commit
f9a31e9850
@ -1986,7 +1986,7 @@ static void msg_puts_printf(const char *str, const ptrdiff_t maxlen)
|
||||
char buf[4];
|
||||
char *p;
|
||||
|
||||
while (*s != NUL && (maxlen < 0 || s - str < maxlen)) {
|
||||
while ((maxlen < 0 || s - str < maxlen) && *s != NUL) {
|
||||
if (!(silent_mode && p_verbose == 0)) {
|
||||
// NL --> CR NL translation (for Unix, not for "--version")
|
||||
p = &buf[0];
|
||||
|
@ -92,7 +92,7 @@ static int included_patches[] = {
|
||||
// 2352 NA
|
||||
// 2351 NA
|
||||
// 2350,
|
||||
// 2349,
|
||||
2349,
|
||||
2348,
|
||||
2347,
|
||||
2346,
|
||||
|
Loading…
Reference in New Issue
Block a user