diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-30 15:01:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-30 15:23:34 +0100 |
commit | 4710993800edcea110087b31330d1062d1e56b0e (patch) | |
tree | fb6c29c9bde9d18946232a6e15bf09b3a0b29450 /libavformat/movenc.c | |
parent | dae7ff04160901a30a35af05f2f149b289c4f0b1 (diff) | |
download | ffmpeg-4710993800edcea110087b31330d1062d1e56b0e.tar.gz |
movenc: memset(0) new cluster elements after realloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r-- | libavformat/movenc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 5820af2189..a1a673cab7 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2090,6 +2090,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt) trk->cluster = av_realloc_f(trk->cluster, sizeof(*trk->cluster), (trk->entry + MOV_INDEX_CLUSTER_SIZE)); if (!trk->cluster) return -1; + memset(trk->cluster + trk->entry, 0, sizeof(*trk->cluster)*MOV_INDEX_CLUSTER_SIZE); } trk->cluster[trk->entry].pos = avio_tell(pb) - size; |