# HG changeset patch # User Christian Brabandt # Date 1462102206 -7200 # Node ID 19d2dfb3f5e2e0863e3613c13ec236715d8dda56 # Parent 8410027b1681bde6bd8005d37d9da97a54fbc8e4 commit https://github.com/vim/vim/commit/9b4ebc692d77ca8ef90d72517347f74c2474dd3d Author: Bram Moolenaar 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) diff --git a/src/quickfix.c b/src/quickfix.c --- 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 --- 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,