Fix handling of 0-length streams (Issue #111)

This commit is contained in:
Michael R Sweet
2025-03-27 12:44:42 -04:00
parent 71d33c03ff
commit ebd5aab39b
3 changed files with 4 additions and 2 deletions

View File

@@ -307,7 +307,8 @@ pdfioObjGetLength(pdfio_obj_t *obj) // I - Object
if ((lenobj = pdfioDictGetObj(obj->value.value.dict, "Length")) == NULL)
{
_pdfioFileError(obj->pdf, "Unable to get length of stream.");
if (!_pdfioDictGetValue(obj->value.value.dict, "Length"))
_pdfioFileError(obj->pdf, "Unable to get length of stream.");
return (0);
}