[PATCH] fixed #2173
authorjeanlf <jeanlf@gpac.io>
Tue, 19 Apr 2022 07:08:45 +0000 (09:08 +0200)
committerAron Xu <aron@debian.org>
Tue, 23 May 2023 11:53:25 +0000 (12:53 +0100)
Gbp-Pq: Name CVE-2022-29537.patch

src/ietf/rtp_pck_mpeg4.c

index c449fe2ba34eee4f2d950da258b65d30985269d2..9212ac3d6246c039555361572b1b8b42bd8d7c97 100644 (file)
@@ -421,6 +421,7 @@ GF_Err gp_rtp_builder_do_avc(GP_RTPPacketizer *builder, u8 *nalu, u32 nalu_size,
        }
 
        if (!nalu) return GF_OK;
+       if (nalu_size<1) return GF_NON_COMPLIANT_BITSTREAM;
 
        /*need a new RTP packet*/
        if (!builder->bytesInPacket) {
@@ -559,6 +560,7 @@ GF_Err gp_rtp_builder_do_hevc(GP_RTPPacketizer *builder, u8 *nalu, u32 nalu_size
        }
 
        if (!nalu) return GF_OK;
+       if (nalu_size<2) return GF_NON_COMPLIANT_BITSTREAM;
 
        /*need a new RTP packet*/
        if (!builder->bytesInPacket) {