Patch 8.2.1991

3 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 15, 2020, 2:51:32 PM11/15/20
to vim...@googlegroups.com

Patch 8.2.1991
Problem: Coverity warns for not using the ga_grow() return value.
Solution: Bail out if ga_grow() fails. (Yegappan Lakshmanan, closes #7303)
Files: src/getchar.c


*** ../vim-8.2.1990/src/getchar.c 2020-11-12 14:20:32.021927293 +0100
--- src/getchar.c 2020-11-15 20:47:33.371626769 +0100
***************
*** 3645,3651 ****
got_int = FALSE;
while (c1 != NUL && !aborted)
{
! ga_grow(&line_ga, 32);

if (vgetorpeek(FALSE) == NUL)
{
--- 3645,3655 ----
got_int = FALSE;
while (c1 != NUL && !aborted)
{
! if (ga_grow(&line_ga, 32) != OK)
! {
! aborted = TRUE;
! break;
! }

if (vgetorpeek(FALSE) == NUL)
{
*** ../vim-8.2.1990/src/version.c 2020-11-15 20:32:54.171882085 +0100
--- src/version.c 2020-11-15 20:48:19.659450313 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1991,
/**/

--
hundred-and-one symptoms of being an internet addict:
251. You've never seen your closest friends who usually live WAY too far away.

/// Bram Moolenaar -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages