[FFmpeg-cvslog] avformat/mov: Free temp buffer upon negative sample_size error.
ffmpeg | branch: release/4.2 | Dale Curtis | Mon May 18 15:35:35 2020 -0700| [7c01f2770131f3e80d1e365f334c26b908178ad4] | committer: Michael Niedermayer avformat/mov: Free temp buffer upon negative sample_size error. 2d8d554f15a7a27cfeca81467cc9341a86f784e2 added a new error condition to mov_read_stsz() but forgot to free a temporary buffer when it occurs. Signed-off-by: Dale Curtis Signed-off-by: Michael Niedermayer (cherry picked from commit cd0771c38c06ef397466123c6c85521835f98bfd) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c01f2770131f3e80d1e365f334c26b908178ad4 --- libavformat/mov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index e57e7444a6..6b0e101af9 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2875,6 +2875,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(, 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; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/mov: Free temp buffer upon negative sample_size error.
ffmpeg | branch: master | Dale Curtis | Mon May 18 15:35:35 2020 -0700| [cd0771c38c06ef397466123c6c85521835f98bfd] | committer: Michael Niedermayer avformat/mov: Free temp buffer upon negative sample_size error. 2d8d554f15a7a27cfeca81467cc9341a86f784e2 added a new error condition to mov_read_stsz() but forgot to free a temporary buffer when it occurs. Signed-off-by: Dale Curtis Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd0771c38c06ef397466123c6c85521835f98bfd --- libavformat/mov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 6490022b1d..e11c9f4457 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -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(, 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; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".