mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 14:31:09 +00:00
avcodec/huffyuvdec: clear remainder of the array on end of input in decode_422_bitstream()
Fixes: msan_uninit-mem_7f909423efcd_9923_yuv_predmed.avi Fixes use of uninitialized memory Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0875a9e4fc
commit
42b6805cc1
@ -406,6 +406,9 @@ static void decode_422_bitstream(HYuvContext *s, int count)
|
||||
READ_2PIX(s->temp[0][2 * i ], s->temp[1][i], 1);
|
||||
READ_2PIX(s->temp[0][2 * i + 1], s->temp[2][i], 2);
|
||||
}
|
||||
for (; i < count; i++)
|
||||
s->temp[0][2 * i ] = s->temp[1][i] =
|
||||
s->temp[0][2 * i + 1] = s->temp[2][i] = 128;
|
||||
} else {
|
||||
for (i = 0; i < count; i++) {
|
||||
READ_2PIX(s->temp[0][2 * i ], s->temp[1][i], 1);
|
||||
|
Loading…
Reference in New Issue
Block a user