diff options
author | Jan C. Nordholz <jnordholz@sec.t-labs.tu-berlin.de> | 2016-08-07 14:09:09 +0200 |
---|---|---|
committer | Amadeusz Sławiński <amade@asmblr.net> | 2016-08-07 14:09:09 +0200 |
commit | 08c5d3b6b07e4b1dfdbfab85e960da11d9ab5623 (patch) | |
tree | 876b18e6c0f576b8994879ba9cfcf48896a305c3 | |
parent | 1babc3f765dfa0e96a7e9452789b0ee9dcd23d46 (diff) | |
download | screen-08c5d3b6b07e4b1dfdbfab85e960da11d9ab5623.tar.gz |
Fixes broken handling of "bind u digraph U+"
This results in a SIGSEGV instead of prompting for the
remainder. Also fixes an allocation inaccuracy I found while
debugging this, even though that one looks innocuous.
Bug-Debian: https://bugs.debian.org/831672
Bug: 48691
-rw-r--r-- | src/process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 4faae47..deaa3cc 100644 --- a/src/process.c +++ b/src/process.c @@ -3854,7 +3854,7 @@ int key; break; case RC_DIGRAPH: - if (argl && argl[0] > 0 && argl[1] > 0) + if (argl && argl[0] > 0 && args[1] && argl[1] > 0) { if (argl[0] != 2) { @@ -4690,9 +4690,9 @@ int *argl; act->argl = 0; return; } - if ((pp = (char **)malloc((unsigned)(argc + 1) * sizeof(char **))) == 0) + if ((pp = (char **)malloc((unsigned)(argc + 1) * sizeof(char *))) == 0) Panic(0, "%s", strnomem); - if ((lp = (int *)malloc((unsigned)(argc) * sizeof(int *))) == 0) + if ((lp = (int *)malloc((unsigned)(argc) * sizeof(int))) == 0) Panic(0, "%s", strnomem); act->nr = nr; act->args = pp; |