Browse Source

rv30_decode_intra_types: make check tighter

This makes no differnce as the affected values cannot occur
But it will likely help static analyzers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
9f9307ff2a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/rv30.c

+ 1
- 1
libavcodec/rv30.c View File

@@ -79,7 +79,7 @@ static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t
for(i = 0; i < 4; i++, dst += r->intra_types_stride - 4){ for(i = 0; i < 4; i++, dst += r->intra_types_stride - 4){
for(j = 0; j < 4; j+= 2){ for(j = 0; j < 4; j+= 2){
int code = svq3_get_ue_golomb(gb) << 1; int code = svq3_get_ue_golomb(gb) << 1;
if(code >= 81U*2U){
if(code > 80U*2U){
av_log(r->s.avctx, AV_LOG_ERROR, "Incorrect intra prediction code\n"); av_log(r->s.avctx, AV_LOG_ERROR, "Incorrect intra prediction code\n");
return -1; return -1;
} }


Loading…
Cancel
Save