[FFmpeg-cvslog] avcodec/jpeglsdec: assert that overflows end at exactly x=w

Michael Niedermayer git at videolan.org
Wed May 13 18:43:42 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed May 13 15:48:17 2015 +0200| [6d3f17838db93647f026338cb63103ce57f5d0e2] | committer: Michael Niedermayer

avcodec/jpeglsdec: assert that overflows end at exactly x=w

If that ever was untrue, there would be a bug in the code

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

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

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

diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 09ddf07..97fc600 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -280,6 +280,7 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s,
 
             if (x >= w) {
                 av_log(NULL, AV_LOG_ERROR, "run overflow\n");
+                av_assert0(x <= w);
                 return;
             }
 



More information about the ffmpeg-cvslog mailing list