Commit 2c0a0b07 authored by Albert Astals Cid's avatar Albert Astals Cid

Gfx::doImage: Fix memory leak on malformed documents

fixes oss-fuzz/8452
parent ace7ca3e
......@@ -4455,6 +4455,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
}
maskColorSpace = GfxColorSpace::parse(nullptr, &obj1, out, state);
if (!maskColorSpace || maskColorSpace->getMode() != csDeviceGray) {
delete maskColorSpace;
goto err1;
}
obj1 = maskDict->lookup("Decode");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment