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:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-11 17:36:22 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-08-11 17:45:42 +0400
commit11420649d021e35a2b037cf156d8256a0c64c484 (patch)
treea42e661ce650ff0e4286c4422173de1fce89b81c
parentdbf5d7e5cd16d4f02b57c24922b1f77755c0427b (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 711d1a4f08..f7629c59d3 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -713,7 +713,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]);