20 Oct
2009
20 Oct
'09
5:11 a.m.
Dmitry Timoshkov wrote:
"Nikolay Sivov" <bunglehead(a)gmail.com> wrote:
Reported as http://bugs.winehq.org/show_bug.cgi?id=19819
Changelog: - prevent possible buffer overrun
- while (!(*lpSrc>>index & 0x0001) && index<MAXTCIINDEX) index++; + while (index < MAXTCIINDEX && !(*lpSrc>>index & 0x0001)) index++;
'index >= MAXTCIINDEX' won't trigger in that case:
if (index >= MAXTCIINDEX || FONT_tci[index].ciCharset == DEFAULT_CHARSET) return FALSE; You're right, it breaks this path. It would be simpler IMO to add one more item to FONT_tci[] instead. Ok.