From: Dale Weiler Date: Sat, 15 Jun 2013 07:39:36 +0000 (+0000) Subject: Limit corrections on strings to <= 16 bytes. Otherwise memory usage spikes instantly... X-Git-Tag: v0.3.0~134 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5012616cb0b37cae53a163d0af9be91d54f54c6c;p=xonotic%2Fgmqcc.git Limit corrections on strings to <= 16 bytes. Otherwise memory usage spikes instantly on errors, and causes Windows DEP to kill gmqcc. --- diff --git a/parser.c b/parser.c index 3ab472f..d6490d4 100644 --- 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) && strlen(parser_tokval(parser)) <= 16) { correction_t corr; correct_init(&corr);