diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-12-19 19:19:31 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-19 19:19:31 +0000 |
commit | bc404bfb32cf2bef34050d2aeae0ea72ccf980cc (patch) | |
tree | 31d8afcbb43b5cde41311e847caddcc199d42178 /src/regexp_nfa.c | |
parent | 86b3ab4fa0de3e8884ab6a6ced2a70592b937d0f (diff) | |
download | vim-git-bc404bfb32cf2bef34050d2aeae0ea72ccf980cc.tar.gz |
patch 8.2.3855: illegal memory access when displaying a blobv8.2.3855
Problem: Illegal memory access when displaying a blob.
Solution: Append a NUL at the end. (Yegappan Lakshmanan, closes #9372)
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r-- | src/regexp_nfa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 9dc246d28..4d7d553bd 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -2917,20 +2917,20 @@ nfa_print_state2(FILE *debugf, nfa_state_T *state, garray_T *indent) ga_concat(indent, (char_u *)"| "); else ga_concat(indent, (char_u *)" "); - ga_append(indent, '\0'); + ga_append(indent, NUL); nfa_print_state2(debugf, state->out, indent); // replace last part of indent for state->out1 indent->ga_len -= 3; ga_concat(indent, (char_u *)" "); - ga_append(indent, '\0'); + ga_append(indent, NUL); nfa_print_state2(debugf, state->out1, indent); // shrink indent indent->ga_len -= 3; - ga_append(indent, '\0'); + ga_append(indent, NUL); } /* |