[woff2] Clean up on large brotli expansion
* src/sfnt/sfwoff2.c (woff2_open_font): set error and goto cleanup Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60711
-
Developer
I actually find these ad-hoc size checks rather unfortunate. If we're actually out of memory then
mallocshould just returnNULLand everything should be fine. The fuzzer's AddressSanitizer really shouldn't be crashing just becausemallocwould returnNULL. I've had this fight many times with the fuzzer people, unfortunately. In reality these checks and the fuzzer ending early is actually decreasing coverage of the failure paths. -
Owner
Thanks for the fix! And: well... I guess we have to live with that.
Please register or sign in to comment