]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Limit corrections on strings to <= 16 bytes. Otherwise memory usage spikes instantly...
authorDale Weiler <killfieldengine@gmail.com>
Sat, 15 Jun 2013 07:40:42 +0000 (07:40 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 15 Jun 2013 07:40:42 +0000 (07:40 +0000)
parser.c

index e92cb6e6326c82faf2822e0c421ca3fbfaa453af..a87cee97aac1b7e65a8323c2bd593610e7157aa3 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1936,7 +1936,7 @@ static bool parse_sya_operand(parser_t *parser, shunt *sy, bool with_labels)
                  * We should also consider adding correction tables for
                  * other things as well.
                  */
-                if (OPTS_OPTION_BOOL(OPTION_CORRECTION)) {
+                if (OPTS_OPTION_BOOL(OPTION_CORRECTION) && parser_tokval(parser) <= 16) {
                     correction_t corr;
                     correct_init(&corr);