aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpowwow@askgustav.com <powwow@askgustav.com>2019-03-19 16:56:59 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2019-04-23 20:37:05 (GMT)
commit890c942b59c67377123164b50f1555b0bc7b67f1 (patch)
tree6cad63013fd36998e724d565d8814e95d61df605
parent6991ac7d77815d7b6b9046ae4fd673ffb6e03b37 (diff)
downloadpowwow-890c942b59c67377123164b50f1555b0bc7b67f1.zip
powwow-890c942b59c67377123164b50f1555b0bc7b67f1.tar.gz
powwow-890c942b59c67377123164b50f1555b0bc7b67f1.tar.bz2
fix possible read outside buffer
-rw-r--r--beam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/beam.c b/beam.c
index 4da6f2e..cff503d 100644
--- a/beam.c
+++ b/beam.c
@@ -309,7 +309,7 @@ void message_edit(char *text, int msglen, char view, char builtin)
key = (unsigned int)-1;
i = 0;
} else {
- if (text[0] != 'M') {
+ if (msglen < 1 || text[0] != 'M') {
tty_printf(errdesc, "M");
free(text);
return;