[PATCH] fixed #1662
authorjeanlf <jeanlf@gpac.io>
Mon, 4 Jan 2021 10:24:26 +0000 (11:24 +0100)
committerMoritz Mühlenhoff <jmm@debian.org>
Thu, 19 Aug 2021 22:03:29 +0000 (23:03 +0100)
Gbp-Pq: Name CVE-2020-35979.patch

src/media_tools/isom_hinter.c

index 912345df7276f27642374221bb38b2f64138377c..8fb06d77bda4497cfc637c0dfbe3b421148a59fd 100644 (file)
@@ -793,8 +793,12 @@ GF_Err gf_hinter_track_process(GF_RTPHinter *tkHint)
                                }
                                remain -= size;
                                tkHint->rtp_p->sl_header.accessUnitEndFlag = remain ? 0 : 1;
-                               e = gf_rtp_builder_process(tkHint->rtp_p, ptr, size, (u8) !remain, samp->dataLength, duration, (u8) (descIndex + GF_RTP_TX3G_SIDX_OFFSET) );
-                               ptr += size;
+                               if (!size) {
+                                       GF_LOG(GF_LOG_WARNING, GF_LOG_RTP, ("[rtp hinter] Broken AVC nalu encapsulation: NALU size is 0, ignoring it\n", size));
+                               } else {
+                                       e = gf_rtp_builder_process(tkHint->rtp_p, ptr, size, (u8) !remain, samp->dataLength, duration, (u8) (descIndex + GF_RTP_TX3G_SIDX_OFFSET) );
+                                       ptr += size;
+                               }
                                tkHint->rtp_p->sl_header.accessUnitStartFlag = 0;
                        }
                } else {