From 7c99ccc845743d2ba4614091333d3926035ae4a3 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 6 Dec 2015 15:03:59 +0000 Subject: [PATCH] Prevent buffer overflow when reading script. --- src/battle/script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle/script.c b/src/battle/script.c index a2a9e52..45909a4 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -138,7 +138,7 @@ static void executeNextLine(ScriptRunner *runner) } else if (strcmp(command, "MSG_BOX") == 0) { - sscanf(line, "%*s %[^;]%*c%[^\n]", strParam[0], strParam[1]); + sscanf(line, "%*s %255[^;]%*c%255[^\n]", strParam[0], strParam[1]); addMessageBox(strParam[0], strParam[1]); } else if (strcmp(command, "WAIT") == 0)