Fix some Coverity-detected issues.

This commit is contained in:
Michael R Sweet
2021-10-01 11:38:04 -04:00
parent 1168fd974f
commit d5173d14da
6 changed files with 13 additions and 4 deletions

View File

@ -1388,7 +1388,11 @@ load_xref(pdfio_file_t *pdf, // I - PDF file
return (false);
}
_pdfioFileSeek(pdf, xref_offset + ptr + 3 - line, SEEK_SET);
if (_pdfioFileSeek(pdf, xref_offset + ptr + 3 - line, SEEK_SET) < 0)
{
_pdfioFileError(pdf, "Unable to seek to xref object %lu %u.", (unsigned long)number, (unsigned)generation);
return (false);
}
PDFIO_DEBUG("load_xref: Loading object %lu %u.\n", (unsigned long)number, (unsigned)generation);