aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-11 15:36:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-11 15:37:15 +0200
commit9a162146ca6cc12ef7ad4a15164349482885962c (patch)
treeb457831c065d943f9e745cb66450ae0780904f5e
parentba47d519e537299179d20b9a599c5824589a3f7a (diff)
downloadffmpeg-9a162146ca6cc12ef7ad4a15164349482885962c.tar.gz
avcodec/snow: fix null pointer dereference in cleanup after allocation failure
Fixes: snowf.avi Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/snow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index dc80ce6f3b..5660eba90d 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -703,7 +703,7 @@ av_cold void ff_snow_common_end(SnowContext *s)
for(i=0; i<MAX_REF_FRAMES; i++){
av_freep(&s->ref_mvs[i]);
av_freep(&s->ref_scores[i]);
- if(s->last_picture[i]->data[0]) {
+ if(s->last_picture[i] && s->last_picture[i]->data[0]) {
av_assert0(s->last_picture[i]->data[0] != s->current_picture->data[0]);
}
av_frame_free(&s->last_picture[i]);