mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-08-29 15:22:06 +02:00
Fix handling of 0-length streams (Issue #111)
This commit is contained in:
@@ -439,7 +439,7 @@ _pdfioStreamOpen(pdfio_obj_t *obj, // I - Object
|
||||
st->pdf = obj->pdf;
|
||||
st->obj = obj;
|
||||
|
||||
if ((st->remaining = pdfioObjGetLength(obj)) == 0)
|
||||
if ((st->remaining = pdfioObjGetLength(obj)) == 0 && !_pdfioDictGetValue(pdfioObjGetDict(obj), "Length"))
|
||||
{
|
||||
_pdfioFileError(obj->pdf, "No stream data.");
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user