Check for non-null baseStream (#7476)

This commit is contained in:
Navidem 2022-03-29 19:14:32 -07:00 committed by GitHub
parent c13fa231dc
commit b4dcddf1ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -120,10 +120,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
Object globals; Object globals;
BaseStream *base_str = doc.getBaseStream(); BaseStream *base_str = doc.getBaseStream();
JBIG2Stream *str = new JBIG2Stream(base_str, &globals); if (base_str) {
str->reset(); JBIG2Stream *str = new JBIG2Stream(base_str, &globals);
globals.free(); str->reset();
delete str; delete str;
}
globals.free();
} }
} catch (...) { } catch (...) {