From 3d2d0b52a3f36f90d74701a620980bf360cf7368 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Sat, 23 Sep 2017 21:22:18 -0500 Subject: [PATCH] [libpng16] Fix Coverity defect regarding errmsg in pngrutil.c --- pngrutil.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pngrutil.c b/pngrutil.c index 5f0fe5ba0..867bc65a5 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1584,17 +1584,11 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) return; } } - - errmsg = "truncated"; -#ifndef __COVERITY__ - if (size == 0) + if (errmsg == NULL) errmsg = png_ptr->zstream.msg; -#endif } - /* else png_icc_check_tag_table output an error */ } - else /* profile truncated */ errmsg = png_ptr->zstream.msg; }