From 00a4a1283a4fc675f49caf2020b852b79abcf4ee Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Thu, 11 May 2017 14:50:01 +0200 Subject: [PATCH] Fixed possible null pointer dereference #392. --- src/ex.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ex.c b/src/ex.c index fde1bb7..3660ec7 100644 --- a/src/ex.c +++ b/src/ex.c @@ -1324,6 +1324,10 @@ static gboolean history(Client *c, gboolean prev) exhist.active = new; } + if (!exhist.active) { + goto failed; + } + vb_echo_force(c, MSG_NORMAL, FALSE, "%s%s", exhist.prefix, (char*)exhist.active->data); g_free(input); -- 2.20.1