Fix conversion of nul-containing strings to binary.

Move key length checks to a common place.
This commit is contained in:
Michael R Sweet
2021-11-02 09:12:43 -04:00
parent af07f64bc3
commit 1e33878506
3 changed files with 14 additions and 11 deletions

View File

@ -400,6 +400,9 @@ _pdfioValueRead(pdfio_file_t *pdf, // I - PDF file
tempptr = tb->bufptr;
while (tempptr < tb->bufend && isspace(*tempptr & 255))
tempptr ++; // Skip whitespace as needed...
if (tempptr < tb->bufend && isdigit(*tempptr & 255))
{
// Integer...
@ -412,7 +415,7 @@ _pdfioValueRead(pdfio_file_t *pdf, // I - PDF file
}
while (tempptr < tb->bufend && isspace(*tempptr & 255))
tempptr ++;
tempptr ++; // Skip whitespace
if (tempptr < tb->bufend && *tempptr == 'R')
{