To: vim_dev@googlegroups.com Subject: Patch 8.2.3328 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3328 Problem: Coverity error for not checking return value. Solution: Check value is not negative. Files: src/spellfile.c *** ../vim-8.2.3327/src/spellfile.c 2021-06-27 22:03:28.645707721 +0200 --- src/spellfile.c 2021-08-11 15:53:24.751935027 +0200 *************** *** 1258,1270 **** gap = &slang->sl_comppat; c = get2c(fd); // todo -= 2; ga_init2(gap, sizeof(char_u *), c); if (ga_grow(gap, c) == OK) while (--c >= 0) { ((char_u **)(gap->ga_data))[gap->ga_len++] = ! read_cnt_string(fd, 1, &cnt); // if (cnt < 0) return cnt; --- 1258,1272 ---- gap = &slang->sl_comppat; c = get2c(fd); // + if (c < 0) + return SP_TRUNCERROR; todo -= 2; ga_init2(gap, sizeof(char_u *), c); if (ga_grow(gap, c) == OK) while (--c >= 0) { ((char_u **)(gap->ga_data))[gap->ga_len++] = ! read_cnt_string(fd, 1, &cnt); // if (cnt < 0) return cnt; *** ../vim-8.2.3327/src/version.c 2021-08-11 14:20:01.863195717 +0200 --- src/version.c 2021-08-11 15:54:02.387851005 +0200 *************** *** 757,758 **** --- 757,760 ---- { /* Add new patch number below this line */ + /**/ + 3328, /**/ -- [SIR LAUNCELOT runs back up the stairs, grabs a rope of the wall and swings out over the heads of the CROWD in a swashbuckling manner towards a large window. He stops just short of the window and is left swing pathetically back and forth.] LAUNCELOT: Excuse me ... could somebody give me a push ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///