diff options
author | James McCoy <jamessan@jamessan.com> | 2016-12-12 15:04:52 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-12-27 14:10:01 -0500 |
commit | 48b5d0f1ba1ad75411f6510ed79d322116ba6809 (patch) | |
tree | 088bc63f0a3cea57ad67b29e420af05ab8f3dfdd /src | |
parent | 39faa56bce66796f731ec339301acc3d303c08e9 (diff) | |
download | rneovim-48b5d0f1ba1ad75411f6510ed79d322116ba6809.tar.gz rneovim-48b5d0f1ba1ad75411f6510ed79d322116ba6809.tar.bz2 rneovim-48b5d0f1ba1ad75411f6510ed79d322116ba6809.zip |
vim-patch:7.4.1813
Problem: Memory access error when running test_quickfix.
Solution: Allocate one more byte. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/9b4ebc692d77ca8ef90d72517347f74c2474dd3d
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/quickfix.c | 12 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index 3c59fcef03..b4f8750c4c 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -492,9 +492,9 @@ qf_init_ext ( // not a NL character. linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len; if (growbuf == NULL) { - growbuf = xmalloc(linelen); + growbuf = xmalloc(linelen + 1); } else if (linelen > growbufsiz) { - growbuf = xrealloc(growbuf, linelen); + growbuf = xrealloc(growbuf, linelen + 1); } growbufsiz = linelen; linebuf = growbuf; @@ -525,10 +525,10 @@ qf_init_ext ( linelen = LINE_MAXLEN - 1; } if (growbuf == NULL) { - growbuf = xmalloc(linelen); + growbuf = xmalloc(linelen + 1); growbufsiz = linelen; } else if (linelen > growbufsiz) { - growbuf = xrealloc(growbuf, linelen); + growbuf = xrealloc(growbuf, linelen + 1); growbufsiz = linelen; } linebuf = growbuf; @@ -549,13 +549,13 @@ qf_init_ext ( linelen = STRLEN(p_buf); if (linelen > IOSIZE - 2) { if (growbuf == NULL) { - growbuf = xmalloc(linelen); + growbuf = xmalloc(linelen + 1); growbufsiz = linelen; } else if (linelen > growbufsiz) { if (linelen > LINE_MAXLEN) { linelen = LINE_MAXLEN - 1; } - growbuf = xrealloc(growbuf, linelen); + growbuf = xrealloc(growbuf, linelen + 1); growbufsiz = linelen; } linebuf = growbuf; diff --git a/src/nvim/version.c b/src/nvim/version.c index 897daf359c..5edced3f0d 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -626,7 +626,7 @@ static int included_patches[] = { 1816, // 1815, // 1814 NA - // 1813, + 1813, // 1812, // 1811 NA // 1810 NA |