From c6aaf0840cf9b2b8cb139ed7110d3d47c2bf3d12 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 18 Apr 2017 10:56:31 +0200 Subject: lavf/mov: Only copy extradata if it exists. Avoids undefined call of memcpy(ptr, NULL, 0); --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/mov.c') diff --git a/libavformat/mov.c b/libavformat/mov.c index 2995a009a8..03fd90e3d3 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2321,7 +2321,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) } else if (a.size > 0) avio_skip(pb, a.size); - if (sc->extradata) { + if (sc->extradata && st->codecpar->extradata) { int extra_size = st->codecpar->extradata_size; /* Move the current stream extradata to the stream context one. */ -- cgit v1.2.3