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

@ -762,8 +762,8 @@ _pdfioDictSetValue(
qsort(dict->pairs, dict->num_pairs, sizeof(_pdfio_pair_t), (int (*)(const void *, const void *))compare_pairs);
#ifdef DEBUG
PDFIO_DEBUG("_pdfioDictSetValue: %lu pairs\n", (unsigned long)dict->num_pairs);
PDFIO_DEBUG("_pdfioDictSetValue: ");
PDFIO_DEBUG("_pdfioDictSetValue(%p): %lu pairs\n", (void *)dict, (unsigned long)dict->num_pairs);
PDFIO_DEBUG("_pdfioDictSetValue(%p): ", (void *)dict);
PDFIO_DEBUG_DICT(dict);
PDFIO_DEBUG("\n");
#endif // DEBUG