[FFmpeg-cvslog] avcodec/snow: fix null pointer dereference in cleanup after allocation failure

Michael Niedermayer git at videolan.org
Mon Aug 11 16:59:47 CEST 2014


ffmpeg | branch: release/2.3 | Michael Niedermayer <michaelni at gmx.at> | Mon Aug 11 15:36:22 2014 +0200| [11420649d021e35a2b037cf156d8256a0c64c484] | committer: Michael Niedermayer

avcodec/snow: fix null pointer dereference in cleanup after allocation failure

Fixes: snowf.avi
Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 9a162146ca6cc12ef7ad4a15164349482885962c)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11420649d021e35a2b037cf156d8256a0c64c484
---

 libavcodec/snow.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 711d1a4..f7629c5 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]);



More information about the ffmpeg-cvslog mailing list