[FFmpeg-cvslog] cavsdec: avoid possible crash with crafted input
Michael Niedermayer
git at videolan.org
Wed Sep 7 15:16:18 CEST 2011
ffmpeg | branch: oldabi | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 10 17:29:51 2011 +0200| [958f0a0f19c76267e662192707b3bddd67f15770] | committer: Michael Niedermayer
cavsdec: avoid possible crash with crafted input
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 9f06c1c61e876e930753da200bfe835817e30a53)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=958f0a0f19c76267e662192707b3bddd67f15770
---
libavcodec/cavsdec.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 6f4c83b..5671c25 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -163,7 +163,7 @@ static inline int decode_residual_inter(AVSContext *h) {
/* get coded block pattern */
int cbp= get_ue_golomb(&h->s.gb);
- if(cbp > 63){
+ if(cbp > 63U){
av_log(h->s.avctx, AV_LOG_ERROR, "illegal inter cbp\n");
return -1;
}
@@ -222,7 +222,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
/* get coded block pattern */
if(h->pic_type == AV_PICTURE_TYPE_I)
cbp_code = get_ue_golomb(gb);
- if(cbp_code > 63){
+ if(cbp_code > 63U){
av_log(h->s.avctx, AV_LOG_ERROR, "illegal intra cbp\n");
return -1;
}
More information about the ffmpeg-cvslog
mailing list