History

avfilter/vf_thumbnail: fix buffer overflow for odd sized HBD inputs

This histogram index was not correctly downshifted to 8-bit.

Niklas Haas committed 1 year ago

Commit ac59fc51 parent 09cb2d41 file · +1 −1Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_thumbnail.c+1−1
@@ -189,7 +189,7 @@ static void get_hist16(int *hist, const uint8_t *p, ptrdiff_t stride, · 188 unmodified lines
189 }189 }
190 /* handle tail */190 /* handle tail */
191 for (int x = width4; x < width; x++)191 for (int x = width4; x < width; x++)
192 hist[p16[x]]++;192 hist[(uint8_t) (p16[x] >> shift)]++;
193 p += stride;193 p += stride;
194 }194 }
195 195

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t