From: Bram Moolenaar Date: Tue, 19 Mar 2019 22:04:17 +0000 (+0100) Subject: patch 8.1.1023: may use NULL pointer when indexing a blob X-Git-Tag: v8.1.1023 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61be376337b0374d55a4b1d8206b2ec87ca54252;p=vim patch 8.1.1023: may use NULL pointer when indexing a blob Problem: May use NULL pointer when indexing a blob. (Coverity) Solution: Break out of loop after using index on blob --- diff --git a/src/eval.c b/src/eval.c index 82be5c0b8..62fe3b5bf 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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) { diff --git a/src/version.c b/src/version.c index 969b874b7..60aee660a 100644 --- a/src/version.c +++ b/src/version.c @@ -779,6 +779,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1023, /**/ 1022, /**/