aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-04 03:30:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-04 03:50:09 +0100
commit5e1bacf2d49622f7ba4245f140b7be35972c0529 (patch)
tree52d54706d7035a9261abe1793e635941e3e6f22b
parent359cd12a43242e3d2682c27a1a0f7dc6b2cfc6fb (diff)
downloadffmpeg-5e1bacf2d49622f7ba4245f140b7be35972c0529.tar.gz
matroskadec: reset size when freeing data.
Fixes null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/matroskadec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index d37346b47e..feb7b8404a 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -770,6 +770,7 @@ static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin)
bin->pos = avio_tell(pb);
if (avio_read(pb, bin->data, length) != length) {
av_freep(&bin->data);
+ bin->size = 0;
return AVERROR(EIO);
}