mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
avcodec/g2meet: Check R/G/B values in epic_decode_pixel_pred()
Fixes: asan_double-free_d34593_861_smp3.wmv Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
3526a120f9
commit
b1e242bc56
@ -555,6 +555,11 @@ static uint32_t epic_decode_pixel_pred(ePICContext *dc, int x, int y,
|
||||
B = ((pred >> B_shift) & 0xFF) - TOSIGNED(delta);
|
||||
}
|
||||
|
||||
if (R<0 || G<0 || B<0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "RGB %d %d %d is out of range\n", R, G, B);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (R << R_shift) | (G << G_shift) | (B << B_shift);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user