diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-20 17:59:53 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-20 17:59:53 +0100 |
commit | 61e07b2394e12f757160cac421ec5c45dc4c074d (patch) | |
tree | 94a7ca36327ff69316500ae0cdb87195a5d49187 /src/regexp_nfa.c | |
parent | f112f30a82f17114d8b08a0fb90928cd19440581 (diff) | |
download | vim-git-61e07b2394e12f757160cac421ec5c45dc4c074d.tar.gz |
patch 8.2.2171: valgrind warning for using uninitialized valuev8.2.2171
Problem: Valgrind warning for using uninitialized value.
Solution: Do not use "startp" or "endp" unless there is a match.
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 2 |
1 files changed, 1 insertions, 1 deletions
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]; |