aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-20 18:12:38 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-20 18:13:17 -0500
commitafe7c43025c0b2ebecb13e8fa1cbd1e1c23ba6a2 (patch)
treec77f727d4e818b036051270efa5197ddb7ea0c96 /src
parent06869a6940ea6943ba5e652d08e3062626fe47e9 (diff)
downloadrneovim-afe7c43025c0b2ebecb13e8fa1cbd1e1c23ba6a2.tar.gz
rneovim-afe7c43025c0b2ebecb13e8fa1cbd1e1c23ba6a2.tar.bz2
rneovim-afe7c43025c0b2ebecb13e8fa1cbd1e1c23ba6a2.zip
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. https://github.com/vim/vim/commit/61e07b2394e12f757160cac421ec5c45dc4c074d
Diffstat (limited to 'src')
-rw-r--r--src/nvim/regexp_nfa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index 137b2304c0..22cd6baf6e 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -6601,7 +6601,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];
}