vim-patch:7.4.1813

Problem:    Memory access error when running test_quickfix.
Solution:   Allocate one more byte. (Yegappan Lakshmanan)

9b4ebc692d
This commit is contained in:
James McCoy 2016-12-12 15:04:52 -05:00
parent 39faa56bce
commit 48b5d0f1ba
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -626,7 +626,7 @@ static int included_patches[] = {
1816,
// 1815,
// 1814 NA
// 1813,
1813,
// 1812,
// 1811 NA
// 1810 NA