This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 627af8c8165d7fa4f28a3c23b2ce7a9c1096fc0b
Author:     Marton Balint <[email protected]>
AuthorDate: Sat Mar 13 22:33:38 2021 +0100
Commit:     michaelni <[email protected]>
CommitDate: Tue Oct 20 20:41:50 2026 +0000

    avcodec/assdec: do not overread if zero padding is missing
    
    Fixes: a3ewdvDE2QSe
    Fixes: hVJyTegWPmu6
    Fixes: out of array read
    Fixes: wrong event text
    Out of array read Replicated through API with ASAN
    Wrong event text Replicated through UnModified FFmpeg with plain output diff
    
    Signed-off-by: Marton Balint <[email protected]>
---
 libavcodec/assdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c
index 89d7b51894..28aebd4d0e 100644
--- a/libavcodec/assdec.c
+++ b/libavcodec/assdec.c
@@ -54,7 +54,7 @@ static int ass_decode_frame(AVCodecContext *avctx, AVSubtitle 
*sub,
         return AVERROR(ENOMEM);
     sub->num_rects = 1;
     sub->rects[0]->type = SUBTITLE_ASS;
-    sub->rects[0]->ass  = av_strdup(avpkt->data);
+    sub->rects[0]->ass  = av_strndup(avpkt->data, avpkt->size);
     if (!sub->rects[0]->ass)
         return AVERROR(ENOMEM);
     *got_sub_ptr = 1;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to