projects
/
openjpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
opj_tcd_dc_level_shift_decode: avoid int32 overflow when prec == 31. Fixes https...
[openjpeg.git]
/
src
/
lib
/
openjp2
/
tcd.c
diff --git
a/src/lib/openjp2/tcd.c
b/src/lib/openjp2/tcd.c
index 08c5a765a12910c26243ecaeefc2a5ad9186ec0e..1213bffea73ae900289492d7f60a4f016533a92e 100644
(file)
--- a/
src/lib/openjp2/tcd.c
+++ b/
src/lib/openjp2/tcd.c
@@
-1883,7
+1883,7
@@
static OPJ_BOOL opj_tcd_dc_level_shift_decode(opj_tcd_t *p_tcd)
l_max = (1 << (l_img_comp->prec - 1)) - 1;
} else {
l_min = 0;
- l_max = (
1 << l_img_comp->prec) - 1
;
+ l_max = (
OPJ_INT32)((1U << l_img_comp->prec) - 1)
;
}
l_current_ptr = l_tile_comp->data;