From: Bram Moolenaar Date: Sun, 20 Dec 2020 16:59:53 +0000 (+0100) Subject: patch 8.2.2171: valgrind warning for using uninitialized value X-Git-Tag: v8.2.2171 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61e07b2394e12f757160cac421ec5c45dc4c074d;p=vim patch 8.2.2171: valgrind warning for using uninitialized value Problem: Valgrind warning for using uninitialized value. Solution: Do not use "startp" or "endp" unless there is a match. --- diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index da80ee921..cbfed49b5 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -7236,7 +7236,7 @@ theend: || (end->lnum == start->lnum && end->col < start->col)) rex.reg_mmatch->endpos[0] = rex.reg_mmatch->startpos[0]; } - else + else if (retval > 0) { if (rex.reg_match->endp[0] < rex.reg_match->startp[0]) rex.reg_match->endp[0] = rex.reg_match->startp[0]; diff --git a/src/version.c b/src/version.c index 6e2e6abc5..d149c9b3f 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2171, /**/ 2170, /**/