Commit ca6d7b6a authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

input: avoid crashing when resizing the window during verbatim input

This fixes https://savannah.gnu.org/bugs/?50872.
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -1463,7 +1463,8 @@ int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len)
retval = parse_verbatim_kbinput(win, kbinput_len);
/* If the code is invalid in the current mode, discard it. */
if ((*retval == '\n' && as_an_at) || (*retval == '\0' && !as_an_at)) {
if (retval != NULL && ((*retval == '\n' && as_an_at) ||
(*retval == '\0' && !as_an_at))) {
*kbinput_len = 0;
beep();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment