diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-08-24 20:48:26 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-08-26 04:52:25 +0200 |
commit | 94e86e252843e500fe3ef750203bfa7d31cab4ce (patch) | |
tree | 7c058c447fa7227b770c85c56df105a8f272e0b5 /libqpdf | |
parent | 8721f189f839276e021136deb3474834258ad8f3 (diff) | |
download | qpdf-94e86e252843e500fe3ef750203bfa7d31cab4ce.tar.zst |
Fix fuzz issue 16301
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 04149b22..a6d07190 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -2310,6 +2310,11 @@ QPDFObjectHandle::newStream(QPDF* qpdf, int objid, int generation, QPDFObjectHandle QPDFObjectHandle::newStream(QPDF* qpdf) { + if (qpdf == 0) + { + throw std::runtime_error( + "attempt to create stream in null qpdf object"); + } QTC::TC("qpdf", "QPDFObjectHandle newStream"); QPDFObjectHandle stream_dict = newDictionary(); QPDFObjectHandle result = qpdf->makeIndirectObject( |