]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.0645: Coverity warns for possible use of NULL pointer v8.1.0645
authorBram Moolenaar <Bram@vim.org>
Thu, 27 Dec 2018 20:27:03 +0000 (21:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 27 Dec 2018 20:27:03 +0000 (21:27 +0100)
Problem:    Coverity warns for possible use of NULL pointer.
Solution:   Check return value of vterm_obtain_screen().

src/terminal.c
src/version.c

index 1875cc3e34af55f83e7f02fb99aa1cd8f7a84e8f..d030f6d70b32b1dc01f12794c337e32212c58150 100644 (file)
@@ -5060,6 +5060,8 @@ f_term_scrape(typval_T *argvars, typval_T *rettv)
     if (term->tl_vterm != NULL)
     {
        screen = vterm_obtain_screen(term->tl_vterm);
+       if (screen == NULL)  // can't really happen
+           return;
        p = NULL;
        line = NULL;
     }
index cec9bc66a6a2fd0bc84cb4a62676834dd4cea42e..823db356f358d5971e9b4f2712e547372ba57bd3 100644 (file)
@@ -799,6 +799,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    645,
 /**/
     644,
 /**/