From f2f4153d007142a8c53da6b11a588683e264a782 Mon Sep 17 00:00:00 2001 From: antma Date: Fri, 10 Jan 2014 16:37:07 +0400 Subject: [PATCH] add field limit for sscanf call (fix libc versions older than 2.13-25) --- interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface.c b/interface.c index 65a5f56..c3b7cc6 100644 --- a/interface.c +++ b/interface.c @@ -560,7 +560,7 @@ void interpreter_chat_mode (char *line) { } if (!strncmp (line, "/history", 8)) { int limit = 40; - sscanf (line, "/history %d", &limit); + sscanf (line, "/history %99d", &limit); if (limit < 0 || limit > 1000) { limit = 40; } do_get_history (chat_mode_id, limit); return;