Fix a couple issues with parsing PDF files produced by Microsoft Reporting

Services (Issue #46)

- Odd cross-reference stream containing 3-byte generation number field for this
  16-bit value
- Odd empty hex strings
This commit is contained in:
Michael R Sweet
2023-10-06 10:46:30 -04:00
parent 87ca4db73f
commit 7f6ffcda22
3 changed files with 26 additions and 2 deletions

View File

@ -495,6 +495,13 @@ _pdfioTokenRead(_pdfio_token_t *tb, // I - Token buffer/stack
*bufptr++ = (char)ch;
break;
}
else if (ch == '>')
{
// Issue #46: Empty hex string from Microsoft PDF generator; treat as
// empty literal string...
*buffer = '(';
break;
}
else if (!isspace(ch & 255) && !isxdigit(ch & 255))
{
_pdfioFileError(tb->pdf, "Syntax error: '<%c'", ch);