[FFmpeg-cvslog] indeo5: Fix null pointer dereference

Michael Niedermayer git at videolan.org
Tue Dec 20 22:25:48 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 20 22:06:35 2011 +0100| [f27930cd9a2d4970b182024a42a9f5103c942f21] | committer: Michael Niedermayer

indeo5: Fix null pointer dereference
Fixes Ticket803
Bug found by: Oana Stratulat

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

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

 libavcodec/ivi_common.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 7f14a89..f240845 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -611,6 +611,9 @@ void ff_ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch)
     const int16_t   *src  = plane->bands[0].buf;
     uint32_t        pitch = plane->bands[0].pitch;
 
+    if(!src)
+        return;
+
     for (y = 0; y < plane->height; y++) {
         for (x = 0; x < plane->width; x++)
             dst[x] = av_clip_uint8(src[x] + 128);



More information about the ffmpeg-cvslog mailing list