summaryrefslogtreecommitdiff
path: root/libavutil/frame.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-13 19:25:03 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-13 19:26:44 +0200
commitfeb6a94f740bccc8e369f8b74714b940490f3901 (patch)
treeb2aebf73e7ade8f198bfc0f62375235beff75645 /libavutil/frame.c
parentcc0380222add8df8ff9b3bd95eaf2b9d8c4c0d11 (diff)
downloadffmpeg-feb6a94f740bccc8e369f8b74714b940490f3901.tar.gz
avutil/frame: fix crash with av_frame_unref(NULL)
Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 2097152 alloc limit Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/frame.c')
-rw-r--r--libavutil/frame.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 4596927f97..4ae75ef5d2 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -463,6 +463,9 @@ void av_frame_unref(AVFrame *frame)
{
int i;
+ if (!frame)
+ return;
+
wipe_side_data(frame);
for (i = 0; i < FF_ARRAY_ELEMS(frame->buf); i++)