[PATCH] fixed #1900
authorjeanlf <jeanlf@gpac.io>
Mon, 30 Aug 2021 15:20:00 +0000 (17:20 +0200)
committerMoritz Mühlenhoff <jmm@debian.org>
Mon, 19 Jun 2023 21:46:06 +0000 (22:46 +0100)
Gbp-Pq: Name CVE-2021-40568.patch

src/media_tools/av_parsers.c

index e92cd16bb0cd837a5246e8f184035769ae6dbc52..aa9eda1be752b6cfed4c9c7c37e83c44a6ff88fd 100644 (file)
@@ -5669,7 +5669,7 @@ static s32 svc_parse_slice(GF_BitStream *bs, AVCState *avc, AVCSliceInfo *si)
        if (si->slice_type > 9) return -1;
 
        pps_id = gf_bs_get_ue(bs);
-       if (pps_id > 255)
+       if ((pps_id < 0) || (pps_id > 255))
                return -1;
        si->pps = &avc->pps[pps_id];
        si->pps->id = pps_id;