aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_nfa.c
diff options
context:
space:
mode:
authorVVKot <volodymyr.kot.ua@gmail.com>2021-12-19 19:49:03 +0000
committerVVKot <volodymyr.kot.ua@gmail.com>2021-12-19 19:50:59 +0000
commit6f72236a001d3b9d4780235ba620c8a1e04f88c9 (patch)
tree3a3b4e564da217ab9d76db36349adc7c2d4aa07b /src/nvim/regexp_nfa.c
parentbdfca2028b69e054eaee2b97e6bbfc955a29e76a (diff)
downloadrneovim-6f72236a001d3b9d4780235ba620c8a1e04f88c9.tar.gz
rneovim-6f72236a001d3b9d4780235ba620c8a1e04f88c9.tar.bz2
rneovim-6f72236a001d3b9d4780235ba620c8a1e04f88c9.zip
vim-patch:8.2.3855: illegal memory access when displaying a blob
Problem: Illegal memory access when displaying a blob. Solution: Append a NUL at the end. (Yegappan Lakshmanan, closes vim/vim#9372) https://github.com/vim/vim/commit/bc404bfb32cf2bef34050d2aeae0ea72ccf980cc
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r--src/nvim/regexp_nfa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index eac1b4596e..41c927eaa6 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -2565,20 +2565,20 @@ static void 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);
}
/*