[libpng17] Quieted Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c,

pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt
would only work with iTXt chunks with length 255 or less.
This commit is contained in:
Glenn Randers-Pehrson
2015-06-03 16:21:57 -05:00
parent f32c657fc7
commit a671f8baea
7 changed files with 43 additions and 32 deletions

View File

@@ -1,7 +1,7 @@
/* pngvalid.c - validate libpng by constructing then reading png files.
*
* Last changed in libpng 1.6.17 [(PENDING RELEASE)]
* Last changed in libpng 1.6.18 [(PENDING RELEASE)]
* Copyright (c) 2014-2015 Glenn Randers-Pehrson
* Written by John Cunningham Bowler
*
@@ -1319,7 +1319,10 @@ store_current_palette(png_store *ps, int *npalette)
* operation.)
*/
if (ps->current == NULL)
{
store_log(ps, ps->pread, "no current stream for palette", 1);
return NULL;
}
/* The result may be null if there is no palette. */
*npalette = ps->current->npalette;