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

Git pushed a commit to branch release/9.0
in repository ffmpeg.

commit c99a0e9ffdd01e7da9aeab8577ae5ed8272bc2c9
Author:     Umar Pathan <[email protected]>
AuthorDate: Wed Aug 12 00:19:30 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Wed Aug 12 04:52:00 2026 +0200

    avformat/webp_anim_dec: use ffio_read_size for ICCP and EXIF chunks
    
    Fixes: use of uninitialized memory
    
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit cfaaf0062c085433ccb500689f137849794aeb63)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/webp_anim_dec.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/libavformat/webp_anim_dec.c b/libavformat/webp_anim_dec.c
index badc36f936..14abb61db4 100644
--- a/libavformat/webp_anim_dec.c
+++ b/libavformat/webp_anim_dec.c
@@ -170,9 +170,11 @@ static int webp_anim_read_header(AVFormatContext *s)
                                                                
AV_PKT_DATA_ICC_PROFILE, size, 0);
                 if (!sd)
                     return AVERROR(ENOMEM);
-                ret = avio_read(pb, sd->data, size);
-                if (ret < 0)
+                ret = ffio_read_size(pb, sd->data, size);
+                if (ret < 0) {
+                    av_packet_side_data_remove(st->codecpar->coded_side_data, 
&st->codecpar->nb_coded_side_data, AV_PKT_DATA_ICC_PROFILE);
                     return ret;
+                }
                 ctx->has_iccp = 1;
             }
             break;
@@ -299,9 +301,11 @@ static int webp_anim_read_packet(AVFormatContext *s, 
AVPacket *pkt)
                                                                
AV_PKT_DATA_EXIF, size, 0);
                 if (!sd)
                     return AVERROR(ENOMEM);
-                ret = avio_read(pb, sd->data, size);
-                if (ret < 0)
+                ret = ffio_read_size(pb, sd->data, size);
+                if (ret < 0) {
+                    av_packet_side_data_remove(st->codecpar->coded_side_data, 
&st->codecpar->nb_coded_side_data, AV_PKT_DATA_EXIF);
                     return ret;
+                }
                 ctx->has_exif = 1;
             }
             break;

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

Reply via email to