Limit corrections on strings to <= 16 bytes. Otherwise memory usage spikes instantly on errors, and causes Windows DEP to kill gmqcc.

This commit is contained in:
Dale Weiler 2013-06-15 07:39:36 +00:00
parent 90a016c6e0
commit 5012616cb0

View file

@ -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);