mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avfilter/vf_thumbnail: fix buffer overflow for odd sized HBD inputs
This histogram index was not correctly downshifted to 8-bit.
This commit is contained in:
@@ -189,7 +189,7 @@ static void get_hist16(int *hist, const uint8_t *p, ptrdiff_t stride,
|
||||
}
|
||||
/* handle tail */
|
||||
for (int x = width4; x < width; x++)
|
||||
hist[p16[x]]++;
|
||||
hist[(uint8_t) (p16[x] >> shift)]++;
|
||||
p += stride;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user