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

@@ -524,6 +524,8 @@ _pdfioArrayRead(pdfio_file_t *pdf, // I - PDF file
_pdfio_value_t value; // Value
PDFIO_DEBUG("_pdfioArrayRead(pdf=%p, tb=%p)\n", pdf, tb);
// Create an array...
array = pdfioArrayCreate(pdf);
@@ -541,6 +543,10 @@ _pdfioArrayRead(pdfio_file_t *pdf, // I - PDF file
if (!_pdfioValueRead(pdf, tb, &value))
break;
PDFIO_DEBUG("_pdfioArrayRead(%p): Appending ", (void *)array);
PDFIO_DEBUG_VALUE(&value);
PDFIO_DEBUG("\n");
append_value(array, &value);
}