You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/flacdec: Check for invalid vlcs
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -259,7 +259,13 @@ static int decode_residuals(FLACContext *s, int32_t *decoded, int pred_order)
|
|||||||
*decoded++ = get_sbits_long(&s->gb, tmp);
|
*decoded++ = get_sbits_long(&s->gb, tmp);
|
||||||
} else {
|
} else {
|
||||||
for (; i < samples; i++) {
|
for (; i < samples; i++) {
|
||||||
*decoded++ = get_sr_golomb_flac(&s->gb, tmp, INT_MAX, 0);
|
int v = get_sr_golomb_flac(&s->gb, tmp, INT_MAX, 0);
|
||||||
|
if (v == 0x80000000){
|
||||||
|
av_log(s->avctx, AV_LOG_ERROR, "invalid residual\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
*decoded++ = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i= 0;
|
i= 0;
|
||||||
|
Reference in New Issue
Block a user