aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-08-24 20:48:26 +0200
committerJay Berkenbilt <ejb@ql.org>2019-08-26 04:52:25 +0200
commit94e86e252843e500fe3ef750203bfa7d31cab4ce (patch)
tree7c058c447fa7227b770c85c56df105a8f272e0b5 /libqpdf
parent8721f189f839276e021136deb3474834258ad8f3 (diff)
downloadqpdf-94e86e252843e500fe3ef750203bfa7d31cab4ce.tar.zst
Fix fuzz issue 16301
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDFObjectHandle.cc5
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(