Commit 489c5905e9 for ffmpeg

commit 489c5905e93f6e58091521180a00d0e4348a3ee9
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Tue Oct 6 07:19:08 2026 +0200

    avformat/dxa: Check the CMAP palette read

    The fix is the one recommended in the report.

    Fixes: use of uninitialized memory
    Fixes: ECBvN9BwPDuw
    Fixes: AISLE-2026-0111-00237
    Use of uninitialized memory Replicated through UnModified FFmpeg (ffprobe, tcp with -rw_timeout) with Valgrind
    Found-by: Joshua Rogers <joshua.rogers@aisle.com>

diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index 76bc7a543d..cc3c33c887 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -198,7 +198,8 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
         case MKTAG('C', 'M', 'A', 'P'):
             pal_size = 768+4;
             memcpy(pal, buf, 4);
-            avio_read(s->pb, pal + 4, 768);
+            if ((ret = ffio_read_size(s->pb, pal + 4, 768)) < 0)
+                return ret;
             break;
         case MKTAG('F', 'R', 'A', 'M'):
             if ((ret = avio_read(s->pb, buf + 4, DXA_EXTRA_SIZE - 4)) != DXA_EXTRA_SIZE - 4) {