You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
avformat/mov: Free temp buffer upon negative sample_size error.
2d8d554f15
added a new error condition
to mov_read_stsz() but forgot to free a temporary buffer when it
occurs.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
5a5d6e052a
commit
cd0771c38c
@ -2886,6 +2886,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
for (i = 0; i < entries && !pb->eof_reached; i++) {
|
||||
sc->sample_sizes[i] = get_bits_long(&gb, field_size);
|
||||
if (sc->sample_sizes[i] < 0) {
|
||||
av_free(buf);
|
||||
av_log(c->fc, AV_LOG_ERROR, "Invalid sample size %d\n", sc->sample_sizes[i]);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
Reference in New Issue
Block a user