[FFmpeg-cvslog] ivi_common: dont dereference null pointers.

Michael Niedermayer git at videolan.org
Fri Nov 9 15:00:09 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov  9 14:17:17 2012 +0100| [4c6e7c2d4d9810d56ee0770e8c9ad68452e83c58] | committer: Michael Niedermayer

ivi_common: dont dereference null pointers.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ivi_common.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index fb553fd..32c0b0f 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -239,6 +239,7 @@ av_cold void ff_ivi_free_buffers(IVIPlaneDesc *planes)
     int p, b, t;
 
     for (p = 0; p < 3; p++) {
+        if (planes[p].bands)
         for (b = 0; b < planes[p].num_bands; b++) {
             av_freep(&planes[p].bands[b].bufs[0]);
             av_freep(&planes[p].bands[b].bufs[1]);



More information about the ffmpeg-cvslog mailing list