Such a scenario is undefined behaviour and would also indicate a bug
in our code.

Suggested-by: James Almer <jamr...@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>
---
 libavformat/utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index cea6d4ca92..652758e98e 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1426,6 +1426,7 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt,
         pkt->pts = pkt->dts = AV_NOPTS_VALUE;
         pkt->pos = -1;
         /* increment read pointer */
+        av_assert1(data || !len);
         data  = len ? data + len : data;
         size -= len;
 
-- 
2.27.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to