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

@@ -568,7 +568,8 @@ _pdfioArrayRead(pdfio_file_t *pdf, // I - PDF file
PDFIO_DEBUG("_pdfioArrayRead(pdf=%p, tb=%p)\n", pdf, tb);
// Create an array...
array = pdfioArrayCreate(pdf);
if ((array = pdfioArrayCreate(pdf)) == NULL)
return (NULL);
// Read until we get "]" to end the array...
while (_pdfioTokenGet(tb, token, sizeof(token)))