]> granicus.if.org Git - vim/commitdiff
patch 8.1.1023: may use NULL pointer when indexing a blob v8.1.1023
authorBram Moolenaar <Bram@vim.org>
Tue, 19 Mar 2019 22:04:17 +0000 (23:04 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 19 Mar 2019 22:04:17 +0000 (23:04 +0100)
Problem:    May use NULL pointer when indexing a blob. (Coverity)
Solution:   Break out of loop after using index on blob

src/eval.c
src/version.c

index 82be5c0b8e6e4de426c9368db6d28c385ca88310..62fe3b5bf2fd0fc1d80d20dd19aa5a94bf8c28a5 100644 (file)
@@ -2208,6 +2208,7 @@ get_lval(
            }
            lp->ll_blob = lp->ll_tv->vval.v_blob;
            lp->ll_tv = NULL;
+           break;
        }
        else
        {
@@ -9219,7 +9220,9 @@ last_set_msg(sctx_T script_ctx)
     }
 }
 
-/* reset v:option_new, v:option_old and v:option_type */
+/*
+ * Reset v:option_new, v:option_old and v:option_type.
+ */
     void
 reset_v_option_vars(void)
 {
index 969b874b7670f79731723589a85642b942e935c4..60aee660a8122b32958428d2ec0053d8e35db273 100644 (file)
@@ -779,6 +779,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1023,
 /**/
     1022,
 /**/