Fix fuzz issue 16301

This commit is contained in:
Jay Berkenbilt 2019-08-24 14:48:26 -04:00
parent 8721f189f8
commit 94e86e2528
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,7 @@
1 0 obj << /AcroForm<< /Fields ÿ /NeedAppearances true>> /Pages 16 0 R >>
endobj
15 0 obj << /Annots [ << ÿ /FT/Ch/Subtype /Widget >>
endobj
16 0 obj <<ÿÿÿÿ/Kids[15 0 R] >>
endobj
trailer << /Root 1 0 R >> ]>> ÿ ÿ

View File

@ -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(