Blame SOURCES/jasper-2.0.14-CVE-2020-27828.patch

48da38
diff -urNp a/src/libjasper/jpc/jpc_enc.c b/src/libjasper/jpc/jpc_enc.c
48da38
--- a/src/libjasper/jpc/jpc_enc.c	2021-06-01 14:07:34.988061153 +0200
48da38
+++ b/src/libjasper/jpc/jpc_enc.c	2021-06-01 14:08:32.100584582 +0200
48da38
@@ -508,6 +508,10 @@ static jpc_enc_cp_t *cp_create(const cha
48da38
 			break;
48da38
 		case OPT_MAXRLVLS:
48da38
 			tccp->maxrlvls = atoi(jas_tvparser_getval(tvp));
48da38
+            if(tccp->maxrlvls > JPC_MAXRLVLS) {
48da38
+				jas_eprintf("invalid number of resolution levels upper than %d\n",JPC_MAXRLVLS);
48da38
+				goto error;
48da38
+			}
48da38
 			break;
48da38
 		case OPT_SOP:
48da38
 			cp->tcp.csty |= JPC_COD_SOP;