diff --git a/ChangeLog b/ChangeLog index 4e30cdcd2..7b7c7cf3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,15 @@ -2018-08-14 Werner Lemberg +2018-08-18 Werner Lemberg + + [psaux] Avoid slow PS font parsing in case of error. + + Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955 + + * src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even + in case of error to avoid potential re-scanning. + +2018-08-18 Werner Lemberg [cff] Fix heap buffer overflow in old engine. diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index 97c9cb16f..906c00861 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -1447,6 +1447,8 @@ bytes, max_bytes ); + parser->cursor = cur; + if ( delimiters ) { if ( cur < parser->limit && *cur != '>' ) @@ -1456,11 +1458,9 @@ goto Exit; } - cur++; + parser->cursor++; } - parser->cursor = cur; - Exit: return error; }