diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-10 17:29:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-03 03:22:37 +0100 |
commit | 80fb9f2c57c1b76c76948ee3dad6b5bb6f381436 (patch) | |
tree | d25781c27bc3cd15097425d2729150ce70885fee | |
parent | 46f9a6203aa37b0f04a63379cb04304c596dc779 (diff) | |
download | ffmpeg-80fb9f2c57c1b76c76948ee3dad6b5bb6f381436.tar.gz |
cavsdec: avoid possible crash with crafted input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f06c1c61e876e930753da200bfe835817e30a53)
-rw-r--r-- | libavcodec/cavsdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 8d30040d74..25b97bfde8 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -165,7 +165,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; } @@ -225,7 +225,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) { /* get coded block pattern */ if(h->pic_type == FF_I_TYPE) 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; } |