mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-09-19 21:06:42 +00:00
avcodec/hevcdsp_template: stay within tables in sao_band_filter()
Fixes: out of array read
Fixes: 47875/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5719393113341952
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9c5250a561
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
5bf38f660c
commit
c03f09f6f4
@ -313,7 +313,7 @@ static void FUNC(sao_band_filter)(uint8_t *_dst, uint8_t *_src,
|
|||||||
offset_table[(k + sao_left_class) & 31] = sao_offset_val[k + 1];
|
offset_table[(k + sao_left_class) & 31] = sao_offset_val[k + 1];
|
||||||
for (y = 0; y < height; y++) {
|
for (y = 0; y < height; y++) {
|
||||||
for (x = 0; x < width; x++)
|
for (x = 0; x < width; x++)
|
||||||
dst[x] = av_clip_pixel(src[x] + offset_table[src[x] >> shift]);
|
dst[x] = av_clip_pixel(src[x] + offset_table[(src[x] >> shift) & 31]);
|
||||||
dst += stride_dst;
|
dst += stride_dst;
|
||||||
src += stride_src;
|
src += stride_src;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user