ffmpeg | branch: release/2.3 | Michael Niedermayer <[email protected]> | 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 <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 9a162146ca6cc12ef7ad4a15164349482885962c)

Signed-off-by: Michael Niedermayer <[email protected]>

> 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]);

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to