19 Oct
2009
19 Oct
'09
11:09 p.m.
"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; It would be simpler IMO to add one more item to FONT_tci[] instead. -- Dmitry.