]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1653: Coverity complains about Null pointer dereference v9.1.1653
authorChristian Brabandt <cb@256bit.org>
Wed, 20 Aug 2025 18:31:08 +0000 (20:31 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 20 Aug 2025 18:31:08 +0000 (20:31 +0200)
Problem:  Coverity complains about Null pointer dereference
          (after v9.1.1643)
Solution: Check that TabPageIdx is not Null

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/mouse.c
src/version.c

index 88d17a545080102373e1e47cbdcc65d27abf7892..86400448a88b9b7c1abe0ff14a19d76ade22dd4b 100644 (file)
@@ -347,8 +347,7 @@ do_mouse(
        if (!is_drag)                   // release, reset got_click
        {
            got_click = FALSE;
-           if (in_tab_line || in_tabpanel
-                   )
+           if (in_tab_line || in_tabpanel)
            {
                in_tab_line = FALSE;
                in_tabpanel = FALSE;
@@ -571,7 +570,7 @@ do_mouse(
        }
        return TRUE;
     }
-    else if (is_drag && (in_tabpanel || in_tab_line))
+    else if (is_drag && (in_tabpanel || (in_tab_line && TabPageIdxs != NULL))
     {
 #if defined(FEAT_TABPANEL)
        if (in_tabpanel)
index 663e3f5ae2a36c426c113770c3ac9cf91a7024e6..359790bfd161fee8c8fbafbe02eb664d65273b9b 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1653,
 /**/
     1652,
 /**/