Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-08 19:01:40 +0300
committerLukasz Marek <lukasz.m.luki2@gmail.com>2014-11-09 19:56:08 +0300
commitdb2caf0a80d25696a1b0a1308e79a2a128ec36f9 (patch)
treeb88d06c5f48b410f18e394a15561b520cc681895 /libavcodec/options.c
parent86476c510ebd14d33ed02289d71bae874f8707a4 (diff)
lavc/options: fix shallow copy context
avcodec_copy_context leaves shallow copy of string/binary/dict options. Double free/accessing freed memory may occur. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r--libavcodec/options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c
index c4ee234766..461e4a13f0 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -187,6 +187,7 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
av_opt_free(dest);
memcpy(dest, src, sizeof(*dest));
+ av_opt_copy(dest, src);
dest->priv_data = orig_priv_data;