[vim] 131/139: patch 7.4.1813 Problem: Memory access error when running test_quickfix. Solution: Allocate one more byte. (Yegappan Lakshmanan)
James McCoy
jamessan at debian.org
Fri May 6 04:00:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch debian/sid
in repository vim.
commit 9b4ebc692d77ca8ef90d72517347f74c2474dd3d
Author: Bram Moolenaar <Bram at vim.org>
Date: Sun May 1 13:28:38 2016 +0200
patch 7.4.1813
Problem: Memory access error when running test_quickfix.
Solution: Allocate one more byte. (Yegappan Lakshmanan)
---
src/quickfix.c | 12 ++++++------
src/version.c | 2 ++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/quickfix.c b/src/quickfix.c
index 99db6d7..6a38c78 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -545,12 +545,12 @@ qf_init_ext(
linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len;
if (growbuf == NULL)
{
- growbuf = alloc(linelen);
+ growbuf = alloc(linelen + 1);
growbufsiz = linelen;
}
else if (linelen > growbufsiz)
{
- growbuf = vim_realloc(growbuf, linelen);
+ growbuf = vim_realloc(growbuf, linelen + 1);
if (growbuf == NULL)
goto qf_init_end;
growbufsiz = linelen;
@@ -589,13 +589,13 @@ qf_init_ext(
linelen = LINE_MAXLEN - 1;
if (growbuf == NULL)
{
- growbuf = alloc(linelen);
+ growbuf = alloc(linelen + 1);
growbufsiz = linelen;
}
else if (linelen > growbufsiz)
{
if ((growbuf = vim_realloc(growbuf,
- linelen)) == NULL)
+ linelen + 1)) == NULL)
goto qf_init_end;
growbufsiz = linelen;
}
@@ -623,14 +623,14 @@ qf_init_ext(
{
if (growbuf == NULL)
{
- growbuf = alloc(linelen);
+ growbuf = alloc(linelen + 1);
growbufsiz = linelen;
}
else if (linelen > growbufsiz)
{
if (linelen > LINE_MAXLEN)
linelen = LINE_MAXLEN - 1;
- if ((growbuf = vim_realloc(growbuf, linelen)) == NULL)
+ if ((growbuf = vim_realloc(growbuf, linelen + 1)) == NULL)
goto qf_init_end;
growbufsiz = linelen;
}
diff --git a/src/version.c b/src/version.c
index 75e692d..5a612d4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1813,
+/**/
1812,
/**/
1811,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/vim.git
More information about the pkg-vim-maintainers
mailing list