mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-08-29 15:22:06 +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:
@@ -205,6 +205,8 @@ _pdfioFilePeek(pdfio_file_t *pdf, // I - PDF file
|
||||
// Yes, try reading more...
|
||||
ssize_t rbytes; // Bytes read
|
||||
|
||||
PDFIO_DEBUG("_pdfioFilePeek: Sliding buffer, total=%ld\n", (long)total);
|
||||
|
||||
memmove(pdf->buffer, pdf->bufptr, total);
|
||||
pdf->bufpos += pdf->bufptr - pdf->buffer;
|
||||
pdf->bufptr = pdf->buffer;
|
||||
@@ -334,6 +336,8 @@ _pdfioFileSeek(pdfio_file_t *pdf, // I - PDF file
|
||||
off_t offset, // I - Offset
|
||||
int whence) // I - Offset base
|
||||
{
|
||||
PDFIO_DEBUG("_pdfioFileSeek(pdf=%p, offset=%ld, whence=%d)\n", pdf, (long)offset, whence);
|
||||
|
||||
// Adjust offset for relative seeks...
|
||||
if (whence == SEEK_CUR)
|
||||
{
|
||||
|
Reference in New Issue
Block a user