aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonerover <pathfinder1644@yahoo.com>2017-03-27 01:04:57 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-03-26 19:04:57 +0200
commitf9a31e98505c0f5e83dd3ba957fbd0f4b150d30c (patch)
tree56e27bd3cf62519009c6477d35139e959d0f5647
parent43a99f77a82e3de980798383ae8a4134953ece06 (diff)
downloadrneovim-f9a31e98505c0f5e83dd3ba957fbd0f4b150d30c.tar.gz
rneovim-f9a31e98505c0f5e83dd3ba957fbd0f4b150d30c.tar.bz2
rneovim-f9a31e98505c0f5e83dd3ba957fbd0f4b150d30c.zip
vim-patch:7.4.2349 (#6368)
Problem: Valgrind reports using uninitialzed memory. (Dominique Pelle) Solution: Check the length before checking for a NUL. https://github.com/vim/vim/commit/2321ca2a78286bc026fa7f407281ddbeb04114bb
-rw-r--r--src/nvim/message.c2
-rw-r--r--src/nvim/version.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index cc9ef15f13..bf54284881 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -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];
diff --git a/src/nvim/version.c b/src/nvim/version.c
index db3b9b51b2..a354634218 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -92,7 +92,7 @@ static int included_patches[] = {
// 2352 NA
// 2351 NA
// 2350,
- // 2349,
+ 2349,
2348,
2347,
2346,