mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.1813
Problem: Memory access error when running test_quickfix. Solution: Allocate one more byte. (Yegappan Lakshmanan)
This commit is contained in:
@@ -545,12 +545,12 @@ qf_init_ext(
|
|||||||
linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len;
|
linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len;
|
||||||
if (growbuf == NULL)
|
if (growbuf == NULL)
|
||||||
{
|
{
|
||||||
growbuf = alloc(linelen);
|
growbuf = alloc(linelen + 1);
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
}
|
}
|
||||||
else if (linelen > growbufsiz)
|
else if (linelen > growbufsiz)
|
||||||
{
|
{
|
||||||
growbuf = vim_realloc(growbuf, linelen);
|
growbuf = vim_realloc(growbuf, linelen + 1);
|
||||||
if (growbuf == NULL)
|
if (growbuf == NULL)
|
||||||
goto qf_init_end;
|
goto qf_init_end;
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
@@ -589,13 +589,13 @@ qf_init_ext(
|
|||||||
linelen = LINE_MAXLEN - 1;
|
linelen = LINE_MAXLEN - 1;
|
||||||
if (growbuf == NULL)
|
if (growbuf == NULL)
|
||||||
{
|
{
|
||||||
growbuf = alloc(linelen);
|
growbuf = alloc(linelen + 1);
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
}
|
}
|
||||||
else if (linelen > growbufsiz)
|
else if (linelen > growbufsiz)
|
||||||
{
|
{
|
||||||
if ((growbuf = vim_realloc(growbuf,
|
if ((growbuf = vim_realloc(growbuf,
|
||||||
linelen)) == NULL)
|
linelen + 1)) == NULL)
|
||||||
goto qf_init_end;
|
goto qf_init_end;
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
}
|
}
|
||||||
@@ -623,14 +623,14 @@ qf_init_ext(
|
|||||||
{
|
{
|
||||||
if (growbuf == NULL)
|
if (growbuf == NULL)
|
||||||
{
|
{
|
||||||
growbuf = alloc(linelen);
|
growbuf = alloc(linelen + 1);
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
}
|
}
|
||||||
else if (linelen > growbufsiz)
|
else if (linelen > growbufsiz)
|
||||||
{
|
{
|
||||||
if (linelen > LINE_MAXLEN)
|
if (linelen > LINE_MAXLEN)
|
||||||
linelen = LINE_MAXLEN - 1;
|
linelen = LINE_MAXLEN - 1;
|
||||||
if ((growbuf = vim_realloc(growbuf, linelen)) == NULL)
|
if ((growbuf = vim_realloc(growbuf, linelen + 1)) == NULL)
|
||||||
goto qf_init_end;
|
goto qf_init_end;
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
}
|
}
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1813,
|
||||||
/**/
|
/**/
|
||||||
1812,
|
1812,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user