summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-11-19 13:37:04 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-11-19 13:37:04 +0000
commit14ab311d2f3814ec36ec6609b946364383f6a956 (patch)
tree772248f903d521305810f4a045549bb1e26e586c /src/lib
parent02ab4363b60ea1e96b53aadb2aa8af561fb5259b (diff)
[trunk] fix issue 191 (thanks Even)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/j2k.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
index 1b116680..05bd3452 100644
--- a/src/lib/openjp2/j2k.c
+++ b/src/lib/openjp2/j2k.c
@@ -7881,6 +7881,12 @@ OPJ_BOOL opj_j2k_read_SPCod_SPCoc( opj_j2k_t *p_j2k,
opj_read_bytes(l_current_ptr, &l_tccp->numresolutions ,1); /* SPcox (D) */
++l_tccp->numresolutions; /* tccp->numresolutions = read() + 1 */
+ if (l_tccp->numresolutions > OPJ_J2K_MAXRLVLS) {
+ opj_event_msg(p_manager, EVT_ERROR,
+ "Invalid value for numresolutions : %d\n",
+ l_tccp->numresolutions);
+ return OPJ_FALSE;
+ }
++l_current_ptr;
/* If user wants to remove more resolutions than the codestream contains, return error */