diff options
author | Thierry Foucu <tfoucu@gmail.com> | 2025-04-07 11:10:31 -0700 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2025-04-21 14:08:23 -0300 |
commit | 1d244c641baf6f11d8c3a61c418c760d628fc548 (patch) | |
tree | f46f25e91c50c28c63af47046a6586e6456754d2 | |
parent | df824211c253a0e2eebe50aaa93617208beabf61 (diff) | |
download | ffmpeg-1d244c641baf6f11d8c3a61c418c760d628fc548.tar.gz |
libavformat/takdec.c: Fix msan error
Make sure we are reading 16 bytes for the MD5
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavformat/takdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/takdec.c b/libavformat/takdec.c index 21fff3fcbf..01bb16ea7b 100644 --- a/libavformat/takdec.c +++ b/libavformat/takdec.c @@ -116,7 +116,8 @@ static int tak_read_header(AVFormatContext *s) if (size != 19) return AVERROR_INVALIDDATA; ffio_init_checksum(pb, tak_check_crc, 0xCE04B7U); - avio_read(pb, md5, 16); + if (avio_read(pb, md5, 16) != 16) + return AVERROR(EIO); if (ffio_get_checksum(s->pb) != avio_rb24(pb)) { av_log(s, AV_LOG_ERROR, "MD5 metadata block CRC error.\n"); if (s->error_recognition & AV_EF_EXPLODE) |