mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Apply 03-CVE-2011-4516-and-CVE-2011-4517 patch from debian libjasper-dev (1.900.1-13) package
This commit is contained in:
parent
c7db1c1cc8
commit
70fed019ae
6
3rdparty/libjasper/jpc_cs.c
vendored
6
3rdparty/libjasper/jpc_cs.c
vendored
@ -743,6 +743,10 @@ static int jpc_cox_getcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
|
||||
return -1;
|
||||
}
|
||||
compparms->numrlvls = compparms->numdlvls + 1;
|
||||
if (compparms->numrlvls > JPC_MAXRLVLS) {
|
||||
jpc_cox_destroycompparms(compparms);
|
||||
return -1;
|
||||
}
|
||||
if (prtflag) {
|
||||
for (i = 0; i < compparms->numrlvls; ++i) {
|
||||
if (jpc_getuint8(in, &tmp)) {
|
||||
@ -1330,7 +1334,7 @@ static int jpc_crg_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in
|
||||
jpc_crgcomp_t *comp;
|
||||
uint_fast16_t compno;
|
||||
crg->numcomps = cstate->numcomps;
|
||||
if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(uint_fast16_t)))) {
|
||||
if (!(crg->comps = jas_alloc2(cstate->numcomps, sizeof(jpc_crgcomp_t)))) {
|
||||
return -1;
|
||||
}
|
||||
for (compno = 0, comp = crg->comps; compno < cstate->numcomps;
|
||||
|
Loading…
Reference in New Issue
Block a user