mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/scpr: do not allow out of array access for 16bit case
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
f062947261
commit
fd7af82c53
@ -408,7 +408,7 @@ static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
|
||||
}
|
||||
|
||||
if (avctx->bits_per_coded_sample == 16) {
|
||||
cx1 = (clr & 0xFF00) >> 2;
|
||||
cx1 = (clr & 0x3F00) >> 2;
|
||||
cx = (clr & 0xFFFFFF) >> 16;
|
||||
} else {
|
||||
cx1 = (clr & 0xFC00) >> 4;
|
||||
@ -647,7 +647,7 @@ static int decompress_p(AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
if (avctx->bits_per_coded_sample == 16) {
|
||||
cx1 = (clr & 0xFF00) >> 2;
|
||||
cx1 = (clr & 0x3F00) >> 2;
|
||||
cx = (clr & 0xFFFFFF) >> 16;
|
||||
} else {
|
||||
cx1 = (clr & 0xFC00) >> 4;
|
||||
|
Loading…
x
Reference in New Issue
Block a user