[trunk] rework code from r2463. Really there has been some code duplication from r2413

Thanks to John Rogers (oracle.com) for report
This commit is contained in:
Mathieu Malaterre 2014-03-14 15:04:24 +00:00
parent 7e1d012161
commit 5e91877636
1 changed files with 0 additions and 5 deletions

View File

@ -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)