diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-11-03 20:47:07 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-11-11 01:28:06 +0100 |
commit | e30d957a9bacf7f7307c640aa0bd1e70cb3bbe7e (patch) | |
tree | 072240f0f2b445368010f41a4c65f59009bb0cbd | |
parent | 898f6582eb51bf77b1f88e8f55eab67ee6ee13b8 (diff) | |
download | ffmpeg-e30d957a9bacf7f7307c640aa0bd1e70cb3bbe7e.tar.gz |
avformat/ilbc: Check avio_read() for failure
Fixes: use of uninitialized value
Fixes: 42537627/clusterfuzz-testcase-minimized-fuzzer_protocol_memory-6656646223298560-cut
Found-by: ossfuzz
Reported-by: Kacper Michajlow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/ilbc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/ilbc.c b/libavformat/ilbc.c index a24aa3da9d..6c441c21bf 100644 --- a/libavformat/ilbc.c +++ b/libavformat/ilbc.c @@ -61,7 +61,8 @@ static int ilbc_read_header(AVFormatContext *s) AVStream *st; uint8_t header[9]; - avio_read(pb, header, 9); + if (avio_read(pb, header, 9) != 9) + return AVERROR_INVALIDDATA; st = avformat_new_stream(s, NULL); if (!st) |