mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-10-19 09:53:18 +00:00
avformat/ipmovie: Check signature_buffer read
Fixes: use of uninitilaized data
Fixes: 385167047/clusterfuzz-testcase-minimized-ffmpeg_dem_IPMOVIE_fuzzer-5941477505564672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 788abe0d25
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
abb4a151ef
commit
f8fda20ba6
1 changed files with 2 additions and 1 deletions
|
@ -639,7 +639,8 @@ static int ipmovie_read_header(AVFormatContext *s)
|
|||
|
||||
ipmovie->avf = s;
|
||||
|
||||
avio_read(pb, signature_buffer, sizeof(signature_buffer));
|
||||
if (avio_read(pb, signature_buffer, sizeof(signature_buffer)) != sizeof(signature_buffer))
|
||||
return AVERROR_INVALIDDATA;
|
||||
while (memcmp(signature_buffer, signature, sizeof(signature))) {
|
||||
memmove(signature_buffer, signature_buffer + 1, sizeof(signature_buffer) - 1);
|
||||
signature_buffer[sizeof(signature_buffer) - 1] = avio_r8(pb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue