PR #24102 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24102
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24102.patch

Fixes: read of uninitialized memory
Fixes: PJaSVrRTt6Kf
Found-by: Eunsoo Kim, Microsoft FORGE Labs



>From c64d3efec5c05f2e1251fad09ab82a34b43def1a Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Wed, 12 Aug 2026 03:22:35 +0200
Subject: [PATCH] avformat/mlv: end the LJ92 packet where its data ends

Fixes: read of uninitialized memory
Fixes: PJaSVrRTt6Kf
Found-by: Eunsoo Kim, Microsoft FORGE Labs
---
 libavformat/mlvdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index 2c1fe001c7..93e29f231c 100644
--- a/libavformat/mlvdec.c
+++ b/libavformat/mlvdec.c
@@ -528,6 +528,7 @@ static int get_packet_lj92(AVFormatContext *avctx, AVStream 
*st, AVIOContext *pb
     ret = avio_read(pbio, pkt->data + header_size, size);
     if (ret < 0)
         return ret;
+    av_shrink_packet(pkt, header_size + ret);
 
     return 0;
 }
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to