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:
Michael R Sweet
2021-05-10 17:37:57 -04:00
parent cfb5ca0ddc
commit 18853ca3d5
7 changed files with 93 additions and 37 deletions

View File

@@ -760,6 +760,8 @@ load_xref(pdfio_file_t *pdf, // I - PDF file
return (false);
}
_pdfioTokenFlush(&tb);
obj->stream_offset = _pdfioFileTell(pdf);
if ((index_array = pdfioDictGetArray(trailer.value.dict, "Index")) != NULL)
@@ -974,6 +976,8 @@ load_xref(pdfio_file_t *pdf, // I - PDF file
_pdfioFileError(pdf, "Trailer is not a dictionary.");
return (false);
}
_pdfioTokenFlush(&tb);
}
else
{