[PATCH] fixed #1902
authorjeanlf <jeanlf@gpac.io>
Mon, 30 Aug 2021 15:29:13 +0000 (17:29 +0200)
committerAron Xu <aron@debian.org>
Tue, 23 May 2023 11:53:25 +0000 (12:53 +0100)
Gbp-Pq: Name CVE-2021-40565.patch

src/media_tools/av_parsers.c

index a0330c630b7b465a7edb97b06c3e62f43fddcc8c..e92cd16bb0cd837a5246e8f184035769ae6dbc52 100644 (file)
@@ -5994,7 +5994,8 @@ s32 gf_media_avc_parse_nalu(GF_BitStream *bs, AVCState *avc)
                        ret = 1;
                        break;
                }
-               assert(avc->s_info.sps);
+               if (!avc->s_info.sps)
+                       return -1;
 
                if (avc->s_info.sps->poc_type == n_state.sps->poc_type) {
                        if (!avc->s_info.sps->poc_type) {