[FFmpeg-cvslog] mlpdec: Fix reading state with 0 bit elements.

Michael Niedermayer git at videolan.org
Thu Mar 28 04:09:33 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 28 03:53:08 2013 +0100| [e234daa5180fabb4e5ba1b713e722a1e12732bc5] | committer: Michael Niedermayer

mlpdec: Fix reading state with 0 bit elements.

This fixes an assertion failure

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=e234daa5180fabb4e5ba1b713e722a1e12732bc5
---

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

diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index a7c79a4..a4d5378 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -635,7 +635,7 @@ static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
             /* TODO: Check validity of state data. */
 
             for (i = 0; i < order; i++)
-                fp->state[i] = get_sbits(gbp, state_bits) << state_shift;
+                fp->state[i] = state_bits ? get_sbits(gbp, state_bits) << state_shift : 0;
         }
     }
 



More information about the ffmpeg-cvslog mailing list