mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
avcodec/rv34: Fix runtime error: signed integer overflow: -2 + -2147483648 cannot be represented in type 'int'
Fixes: 642/clusterfuzz-testcase-558358808074649 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1ad60e4e70
commit
24f6559bd2
@ -866,6 +866,11 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type)
|
|||||||
for(i = 0; i < num_mvs[block_type]; i++){
|
for(i = 0; i < num_mvs[block_type]; i++){
|
||||||
r->dmv[i][0] = get_interleaved_se_golomb(gb);
|
r->dmv[i][0] = get_interleaved_se_golomb(gb);
|
||||||
r->dmv[i][1] = get_interleaved_se_golomb(gb);
|
r->dmv[i][1] = get_interleaved_se_golomb(gb);
|
||||||
|
if (r->dmv[i][0] == INVALID_VLC ||
|
||||||
|
r->dmv[i][1] == INVALID_VLC) {
|
||||||
|
r->dmv[i][0] = r->dmv[i][1] = 0;
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
switch(block_type){
|
switch(block_type){
|
||||||
case RV34_MB_TYPE_INTRA:
|
case RV34_MB_TYPE_INTRA:
|
||||||
|
Loading…
Reference in New Issue
Block a user