Browse Source

Merge commit '0f678c0214dccb355ed8955077a2bea46984fbc8'

* commit '0f678c0214dccb355ed8955077a2bea46984fbc8':
  aic: Validate values read from the bitstream

Conflicts:
	libavcodec/aic.c

See: 657875b145
Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
72abfba884
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/aic.c

+ 2
- 2
libavcodec/aic.c View File

@@ -223,7 +223,7 @@ static int aic_decode_coeffs(GetBitContext *gb, int16_t *dst,
break;
GET_CODE(val, coeff_type, coeff_bits);
val++;
if (val >= 0x10000)
if (val >= 0x10000 || val < 0)
return AVERROR_INVALIDDATA;
dst[scan[idx]] = val;
} while (idx < num_coeffs - 1);
@@ -233,7 +233,7 @@ static int aic_decode_coeffs(GetBitContext *gb, int16_t *dst,
for (mb = 0; mb < slice_width; mb++) {
for (idx = 0; idx < num_coeffs; idx++) {
GET_CODE(val, coeff_type, coeff_bits);
if (val >= 0x10000)
if (val >= 0x10000 || val < 0)
return AVERROR_INVALIDDATA;
dst[scan[idx]] = val;
}


Loading…
Cancel
Save