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>
(cherry picked from commit e30d957a9b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 2 months ago
parent 1f1b309f9e
commit 445065e23a
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 3
      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)

Loading…
Cancel
Save