From 162f9f87f9c25c7f87f81b8fef04b49e8b25693d Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 16 Nov 2015 09:23:25 -0600 Subject: [PATCH] [libpng16] Remove newly-added useless typecasts. --- pngrutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pngrutil.c b/pngrutil.c index a05c999f2..dac00caa0 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1670,7 +1670,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) ++entry_start; /* A sample depth should follow the separator, and we should be on it */ - if (length < 2 || (png_uint_32)(entry_start - buffer) > length - 2) + if (length < 2 || entry_start - buffer > length - 2) { png_warning(png_ptr, "malformed sPLT chunk"); return; @@ -2174,7 +2174,7 @@ png_handle_pCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) /* We need to have at least 12 bytes after the purpose string * in order to get the parameter information. */ - if (length < 12 || (png_uint_32)(endptr - buf) <= 12) + if (length < 12 || endptr - buf <= 12) { png_chunk_benign_error(png_ptr, "invalid"); return;