To: vim_dev@googlegroups.com Subject: Patch 7.4.1813 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1813 Problem: Memory access error when running test_quickfix. Solution: Allocate one more byte. (Yegappan Lakshmanan) Files: src/quickfix.c *** ../vim-7.4.1812/src/quickfix.c 2016-04-30 13:16:45.537142117 +0200 --- src/quickfix.c 2016-05-01 13:25:19.551778058 +0200 *************** *** 545,556 **** linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len; if (growbuf == NULL) { ! growbuf = alloc(linelen); growbufsiz = linelen; } else if (linelen > growbufsiz) { ! growbuf = vim_realloc(growbuf, linelen); if (growbuf == NULL) goto qf_init_end; growbufsiz = linelen; --- 545,556 ---- linelen = len > LINE_MAXLEN ? LINE_MAXLEN - 1 : len; if (growbuf == NULL) { ! growbuf = alloc(linelen + 1); growbufsiz = linelen; } else if (linelen > growbufsiz) { ! growbuf = vim_realloc(growbuf, linelen + 1); if (growbuf == NULL) goto qf_init_end; growbufsiz = linelen; *************** *** 589,601 **** linelen = LINE_MAXLEN - 1; if (growbuf == NULL) { ! growbuf = alloc(linelen); growbufsiz = linelen; } else if (linelen > growbufsiz) { if ((growbuf = vim_realloc(growbuf, ! linelen)) == NULL) goto qf_init_end; growbufsiz = linelen; } --- 589,601 ---- linelen = LINE_MAXLEN - 1; if (growbuf == NULL) { ! growbuf = alloc(linelen + 1); growbufsiz = linelen; } else if (linelen > growbufsiz) { if ((growbuf = vim_realloc(growbuf, ! linelen + 1)) == NULL) goto qf_init_end; growbufsiz = linelen; } *************** *** 623,636 **** { if (growbuf == NULL) { ! growbuf = alloc(linelen); growbufsiz = linelen; } else if (linelen > growbufsiz) { if (linelen > LINE_MAXLEN) linelen = LINE_MAXLEN - 1; ! if ((growbuf = vim_realloc(growbuf, linelen)) == NULL) goto qf_init_end; growbufsiz = linelen; } --- 623,636 ---- { if (growbuf == NULL) { ! growbuf = alloc(linelen + 1); growbufsiz = linelen; } else if (linelen > growbufsiz) { if (linelen > LINE_MAXLEN) linelen = LINE_MAXLEN - 1; ! if ((growbuf = vim_realloc(growbuf, linelen + 1)) == NULL) goto qf_init_end; growbufsiz = linelen; } *** ../vim-7.4.1812/src/version.c 2016-05-01 13:09:53.866174520 +0200 --- src/version.c 2016-05-01 13:27:03.990605014 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1813, /**/ -- Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke Any sufficiently advanced bug is indistinguishable from a feature. Rich Kulawiec /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///