mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-07-18 23:09:49 +02:00
Increase token buffer to 256 bytes, to avoid overflow scenarios.
Add _pdfioTokenFlush to manually flush the token buffer. Add more debug printfs.
This commit is contained in:
@ -215,12 +215,14 @@ _pdfioObjLoad(pdfio_obj_t *obj) // I - Object
|
||||
}
|
||||
|
||||
// Now see if there is an associated stream...
|
||||
if (!_pdfioFileGets(obj->pdf, line, sizeof(line)))
|
||||
if (!_pdfioTokenGet(&tb, line, sizeof(line)))
|
||||
{
|
||||
_pdfioFileError(obj->pdf, "Early end-of-file for object %lu.", (unsigned long)obj->number);
|
||||
return (false);
|
||||
}
|
||||
|
||||
_pdfioTokenFlush(&tb);
|
||||
|
||||
if (!strcmp(line, "stream"))
|
||||
{
|
||||
// Yes, save its location...
|
||||
|
Reference in New Issue
Block a user