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 #9372)
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 9dc246d..4d7d553 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -2917,20 +2917,20 @@
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);
}
/*