summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-14 15:04:24 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-14 15:04:24 +0000
commit5e91877636fc1a663087e783f7ce93cf44843204 (patch)
tree69a0cb8b72d4585f7137398b4029637061f053e2 /src/lib
parent7e1d01216194f0f7ccf987dde5225144f76b50eb (diff)
[trunk] rework code from r2463. Really there has been some code duplication from r2413
Thanks to John Rogers (oracle.com) for report
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/jp2.c5
1 files changed, 0 insertions, 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
@@ -1007,11 +1007,6 @@ OPJ_BOOL opj_jp2_read_pclr( opj_jp2_t *jp2,
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)
- return OPJ_FALSE;
-
opj_read_bytes(p_pclr_header_data, &l_value , bytes_to_read); /* Cji */
p_pclr_header_data += bytes_to_read;
*entries = (OPJ_UINT32) l_value;