Commit 52ee21f1 authored by antma's avatar antma

add field limit for sscanf call (fix libc versions older than 2.13-25)

parent 136dbd00
...@@ -560,7 +560,7 @@ void interpreter_chat_mode (char *line) { ...@@ -560,7 +560,7 @@ void interpreter_chat_mode (char *line) {
} }
if (!strncmp (line, "/history", 8)) { if (!strncmp (line, "/history", 8)) {
int limit = 40; int limit = 40;
sscanf (line, "/history %d", &limit); sscanf (line, "/history %99d", &limit);
if (limit < 0 || limit > 1000) { limit = 40; } if (limit < 0 || limit > 1000) { limit = 40; }
do_get_history (chat_mode_id, limit); do_get_history (chat_mode_id, limit);
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment