From 5e91877636fc1a663087e783f7ce93cf44843204 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Fri, 14 Mar 2014 15:04:24 +0000 Subject: [PATCH] [trunk] rework code from r2463. Really there has been some code duplication from r2413 Thanks to John Rogers (oracle.com) for report --- src/lib/openjp2/jp2.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/lib/openjp2/jp2.c b/src/lib/openjp2/jp2.c index 7ed9a54c..51ddab01 100644 --- a/src/lib/openjp2/jp2.c +++ b/src/lib/openjp2/jp2.c @@ -1002,11 +1002,6 @@ OPJ_BOOL opj_jp2_read_pclr( opj_jp2_t *jp2, for(i = 0; i < nr_channels; ++i) { OPJ_UINT32 bytes_to_read = (OPJ_UINT32)((channel_size[i]+7)>>3); - if (bytes_to_read > sizeof(OPJ_UINT32)) - bytes_to_read = sizeof(OPJ_UINT32); - if ((ptrdiff_t)p_pclr_header_size < p_pclr_header_data - orig_header_data + (ptrdiff_t)bytes_to_read) - return OPJ_FALSE; - if (bytes_to_read > sizeof(OPJ_UINT32)) bytes_to_read = sizeof(OPJ_UINT32); if ((ptrdiff_t)p_pclr_header_size < p_pclr_header_data - orig_header_data + (ptrdiff_t)bytes_to_read)