[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] input: avoid crashing when resizing the window duri
From: |
Benno Schulenberg |
Subject: |
[Nano-devel] [PATCH] input: avoid crashing when resizing the window during verbatim input |
Date: |
Tue, 25 Apr 2017 13:09:49 +0200 |
* Downstream may want to apply this patch to 2.8.1. *
This fixes https://savannah.gnu.org/bugs/?50872.
---
src/winio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/winio.c b/src/winio.c
index 42aaae6c..85f9f881 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -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();
}
--
2.12.1
- [Nano-devel] [PATCH] input: avoid crashing when resizing the window during verbatim input,
Benno Schulenberg <=