From 890c942b59c67377123164b50f1555b0bc7b67f1 Mon Sep 17 00:00:00 2001 From: "powwow@askgustav.com" Date: Tue, 19 Mar 2019 17:56:59 +0100 Subject: fix possible read outside buffer 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; -- cgit v0.10.2