Skip to content

Commit

Permalink
bug: Fix possible null pointer when /First does not exist (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
eknoes authored Jun 22, 2024
1 parent 88db9e0 commit 11344af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PDFWriter/PDFParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,7 @@ PDFObject* PDFParser::ParseExistingInDirectStreamObject(ObjectIDType inObjectId)
ObjectIDType objectsCount = (ObjectIDType)streamObjectsCount->GetValue();

PDFObjectCastPtr<PDFInteger> firstStreamObjectPosition(QueryDictionaryObject(streamDictionary.GetPtr(),"First"));
if(!streamObjectsCount)
if(!firstStreamObjectPosition)
{
TRACE_LOG1("PDFParser::ParseExistingInDirectStreamObject, no First key in stream dictionary %ld",objectStreamID);
status = PDFHummus::eFailure;
Expand Down

0 comments on commit 11344af

Please sign in to comment.