diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-06-20 00:04:36 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-22 18:43:11 +0200 |
commit | 73953df71a28e94d8959facba7906cf5975ca4ef (patch) | |
tree | 2b9cb23701465e766ef67686b33bb1c13ad67699 /libavformat/matroskadec.c | |
parent | f83896abda1e78ebbbda0f184b682b4fabadc682 (diff) | |
download | ffmpeg-73953df71a28e94d8959facba7906cf5975ca4ef.tar.gz |
Replace av_malloc() and memset(0) by av_mallocz()
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e376baeac2..d5bc9230bb 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -746,11 +746,9 @@ static int ebml_read_ascii(AVIOContext *pb, int size, char **str) static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin) { av_free(bin->data); - if (!(bin->data = av_malloc(length + FF_INPUT_BUFFER_PADDING_SIZE))) + if (!(bin->data = av_mallocz(length + FF_INPUT_BUFFER_PADDING_SIZE))) return AVERROR(ENOMEM); - memset(bin->data + length, 0, FF_INPUT_BUFFER_PADDING_SIZE); - bin->size = length; bin->pos = avio_tell(pb); if (avio_read(pb, bin->data, length) != length) { |