[VARC] Check for an OOM

Otherwise we can infinitely recurse.

Fixes https://oss-fuzz.com/testcase-detail/6221534946459648
This commit is contained in:
Behdad Esfahbod 2024-05-30 14:31:32 -06:00
parent 9f8f81403d
commit 88e9cd3fd3

View file

@ -124,7 +124,7 @@ struct VARC
return true;
(*edges_left)--;
if (visited->has (glyph))
if (visited->has (glyph) || visited->in_error ())
return true;
visited->add (glyph);