64 lines
2.4 KiB
Diff
64 lines
2.4 KiB
Diff
diff -rupN --no-dereference openjpeg-2.3.1/src/lib/openjp2/pi.c openjpeg-2.3.1-new/src/lib/openjp2/pi.c
|
|
--- openjpeg-2.3.1/src/lib/openjp2/pi.c 2020-12-17 16:25:44.966030303 +0100
|
|
+++ openjpeg-2.3.1-new/src/lib/openjp2/pi.c 2020-12-17 16:25:45.053030223 +0100
|
|
@@ -238,6 +238,13 @@ static OPJ_BOOL opj_pi_next_lrcp(opj_pi_
|
|
opj_pi_resolution_t *res = NULL;
|
|
OPJ_UINT32 index = 0;
|
|
|
|
+ if (pi->poc.compno0 >= pi->numcomps ||
|
|
+ pi->poc.compno1 >= pi->numcomps + 1) {
|
|
+ opj_event_msg(pi->manager, EVT_ERROR,
|
|
+ "opj_pi_next_lrcp(): invalid compno0/compno1\n");
|
|
+ return OPJ_FALSE;
|
|
+ }
|
|
+
|
|
if (!pi->first) {
|
|
comp = &pi->comps[pi->compno];
|
|
res = &comp->resolutions[pi->resno];
|
|
@@ -291,6 +298,13 @@ static OPJ_BOOL opj_pi_next_rlcp(opj_pi_
|
|
opj_pi_resolution_t *res = NULL;
|
|
OPJ_UINT32 index = 0;
|
|
|
|
+ if (pi->poc.compno0 >= pi->numcomps ||
|
|
+ pi->poc.compno1 >= pi->numcomps + 1) {
|
|
+ opj_event_msg(pi->manager, EVT_ERROR,
|
|
+ "opj_pi_next_rlcp(): invalid compno0/compno1\n");
|
|
+ return OPJ_FALSE;
|
|
+ }
|
|
+
|
|
if (!pi->first) {
|
|
comp = &pi->comps[pi->compno];
|
|
res = &comp->resolutions[pi->resno];
|
|
@@ -337,6 +351,13 @@ static OPJ_BOOL opj_pi_next_rpcl(opj_pi_
|
|
opj_pi_resolution_t *res = NULL;
|
|
OPJ_UINT32 index = 0;
|
|
|
|
+ if (pi->poc.compno0 >= pi->numcomps ||
|
|
+ pi->poc.compno1 >= pi->numcomps + 1) {
|
|
+ opj_event_msg(pi->manager, EVT_ERROR,
|
|
+ "opj_pi_next_rpcl(): invalid compno0/compno1\n");
|
|
+ return OPJ_FALSE;
|
|
+ }
|
|
+
|
|
if (!pi->first) {
|
|
goto LABEL_SKIP;
|
|
} else {
|
|
@@ -472,7 +493,7 @@ static OPJ_BOOL opj_pi_next_pcrl(opj_pi_
|
|
if (pi->poc.compno0 >= pi->numcomps ||
|
|
pi->poc.compno1 >= pi->numcomps + 1) {
|
|
opj_event_msg(pi->manager, EVT_ERROR,
|
|
- "opj_pi_next_pcrl(): invalid compno0/compno1");
|
|
+ "opj_pi_next_pcrl(): invalid compno0/compno1\n");
|
|
return OPJ_FALSE;
|
|
}
|
|
|
|
@@ -610,7 +631,7 @@ static OPJ_BOOL opj_pi_next_cprl(opj_pi_
|
|
if (pi->poc.compno0 >= pi->numcomps ||
|
|
pi->poc.compno1 >= pi->numcomps + 1) {
|
|
opj_event_msg(pi->manager, EVT_ERROR,
|
|
- "opj_pi_next_cprl(): invalid compno0/compno1");
|
|
+ "opj_pi_next_cprl(): invalid compno0/compno1\n");
|
|
return OPJ_FALSE;
|
|
}
|
|
|