aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-10 17:29:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-07 14:59:29 +0200
commitb6187e48db484f9fe8437457bcb382c331baf8c5 (patch)
treee2d5c68fb9e6e414c534f7769838cd443c736b39
parent8af11e51f22705f37818f0aaded8bbd24dd34aac (diff)
downloadffmpeg-b6187e48db484f9fe8437457bcb382c331baf8c5.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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 222355ea5e..906afdb668 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -166,7 +166,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;
}
@@ -226,7 +226,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;
}