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>
This commit is contained in:
Michael Niedermayer 2024-11-03 20:47:07 +01:00
parent 898f6582eb
commit e30d957a9b
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ static int ilbc_read_header(AVFormatContext *s)
AVStream *st; AVStream *st;
uint8_t header[9]; 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); st = avformat_new_stream(s, NULL);
if (!st) if (!st)