From e58e28903371ef25d505498b7072e87037fca695 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Mon, 18 Jul 2011 17:40:06 -0400 Subject: [PATCH] Fix crash when signal(qid,TIME) is not given a third argument --- src/funmisc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/funmisc.c b/src/funmisc.c index 2f254ce..53db28d 100644 --- a/src/funmisc.c +++ b/src/funmisc.c @@ -725,7 +725,8 @@ FUNCTION(fun_signal) { if(qsig == QID_FALSE) { safe_str("#-1 INVALID SIGNAL", buff, bp); return; - } else if(qsig == QID_TIME && (!*args[2] || atoi(args[2]) < 0)) { + } else if(qsig == QID_TIME && (!args[2] || !*args[2] || + atoi(args[2]) < 0)) { safe_str("#-1 INVALID TIME ARGUMENT", buff, bp); return; } -- 2.30.2