Fix Coverity-discovered issues.

This commit is contained in:
Michael R Sweet
2021-06-04 10:56:23 -04:00
parent caf398d72c
commit ee5fcc2a4a
5 changed files with 136 additions and 95 deletions

View File

@@ -157,7 +157,10 @@ _pdfioFileGets(pdfio_file_t *pdf, // I - PDF file
{
// Check for a LF after CR
if (pdf->bufptr >= pdf->bufend)
fill_buffer(pdf);
{
if (!fill_buffer(pdf))
break;
}
if (pdf->bufptr < pdf->bufend && *(pdf->bufptr) == '\n')
pdf->bufptr ++;