mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/mov: Do not zero memory that is written too or unused
Fixes: OOM
Fixes: 31220/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6033383962574848
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 c1fe1114bc
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
60d304ca92
commit
c44458dcfa
@ -3008,7 +3008,7 @@ static int mov_read_sdtp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||||||
av_freep(&sc->sdtp_data);
|
av_freep(&sc->sdtp_data);
|
||||||
sc->sdtp_count = 0;
|
sc->sdtp_count = 0;
|
||||||
|
|
||||||
sc->sdtp_data = av_mallocz(entries);
|
sc->sdtp_data = av_malloc(entries);
|
||||||
if (!sc->sdtp_data)
|
if (!sc->sdtp_data)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user