diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-11 15:36:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-28 18:44:37 +0100 |
commit | c9da441eb4606a9eeaa12a8f8f9ef8201c01db46 (patch) | |
tree | a2ff7a6774611b5a4390b2def403cde75f789e1e | |
parent | f405267493c8baf900195bf7989f371b861041f6 (diff) | |
download | ffmpeg-c9da441eb4606a9eeaa12a8f8f9ef8201c01db46.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>
(cherry picked from commit 9a162146ca6cc12ef7ad4a15164349482885962c)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/snow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index b54c491f42..9a07d976e5 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -688,7 +688,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]); |