mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
39faa56bce
commit
48b5d0f1ba
@ -492,9 +492,9 @@ qf_init_ext (
|
|||||||
// not a NL character.
|
// not a NL character.
|
||||||
linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len;
|
linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len;
|
||||||
if (growbuf == NULL) {
|
if (growbuf == NULL) {
|
||||||
growbuf = xmalloc(linelen);
|
growbuf = xmalloc(linelen + 1);
|
||||||
} else if (linelen > growbufsiz) {
|
} else if (linelen > growbufsiz) {
|
||||||
growbuf = xrealloc(growbuf, linelen);
|
growbuf = xrealloc(growbuf, linelen + 1);
|
||||||
}
|
}
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
linebuf = growbuf;
|
linebuf = growbuf;
|
||||||
@ -525,10 +525,10 @@ qf_init_ext (
|
|||||||
linelen = LINE_MAXLEN - 1;
|
linelen = LINE_MAXLEN - 1;
|
||||||
}
|
}
|
||||||
if (growbuf == NULL) {
|
if (growbuf == NULL) {
|
||||||
growbuf = xmalloc(linelen);
|
growbuf = xmalloc(linelen + 1);
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
} else if (linelen > growbufsiz) {
|
} else if (linelen > growbufsiz) {
|
||||||
growbuf = xrealloc(growbuf, linelen);
|
growbuf = xrealloc(growbuf, linelen + 1);
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
}
|
}
|
||||||
linebuf = growbuf;
|
linebuf = growbuf;
|
||||||
@ -549,13 +549,13 @@ qf_init_ext (
|
|||||||
linelen = STRLEN(p_buf);
|
linelen = STRLEN(p_buf);
|
||||||
if (linelen > IOSIZE - 2) {
|
if (linelen > IOSIZE - 2) {
|
||||||
if (growbuf == NULL) {
|
if (growbuf == NULL) {
|
||||||
growbuf = xmalloc(linelen);
|
growbuf = xmalloc(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;
|
||||||
}
|
}
|
||||||
growbuf = xrealloc(growbuf, linelen);
|
growbuf = xrealloc(growbuf, linelen + 1);
|
||||||
growbufsiz = linelen;
|
growbufsiz = linelen;
|
||||||
}
|
}
|
||||||
linebuf = growbuf;
|
linebuf = growbuf;
|
||||||
|
@ -626,7 +626,7 @@ static int included_patches[] = {
|
|||||||
1816,
|
1816,
|
||||||
// 1815,
|
// 1815,
|
||||||
// 1814 NA
|
// 1814 NA
|
||||||
// 1813,
|
1813,
|
||||||
// 1812,
|
// 1812,
|
||||||
// 1811 NA
|
// 1811 NA
|
||||||
// 1810 NA
|
// 1810 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user