[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 committed 2024-05-30 14:31:32 -06:00
1 parent 9f8f81403d
commit 88e9cd3fd3
1 file changed
+1 -1
+1 -1
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);