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

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

commit 1a5c49d841fe47a31da1e275fc57b68e9f704261
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Wed May 22 06:57:19 2024 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Jun 21 17:59:33 2026 +0200

    avformat/dhav: Check amount read
    
    Prevents potential use of uninitialized data in the following
    memcmp().
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
    (cherry picked from commit d8cad01805be74783344d69e81c9c31f49ba4d92)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavformat/dhav.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/dhav.c b/libavformat/dhav.c
index 14059a8e0c..41a59491c3 100644
--- a/libavformat/dhav.c
+++ b/libavformat/dhav.c
@@ -265,9 +265,12 @@ static int dhav_read_header(AVFormatContext *s)
 {
     DHAVContext *dhav = s->priv_data;
     uint8_t signature[5];
+    int ret;
 
     ffio_ensure_seekback(s->pb, 5);
-    avio_read(s->pb, signature, sizeof(signature));
+    ret = ffio_read_size(s->pb, signature, sizeof(signature));
+    if (ret < 0)
+        return ret;
     if (!memcmp(signature, "DAHUA", 5)) {
         avio_skip(s->pb, 0x400 - 5);
         dhav->last_good_pos = avio_tell(s->pb);

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

Reply via email to