gdi32 : Correction of bug 20850 Write buffer overflow in WidenPath()

Dan Kegel dank at kegel.com
Sun Nov 29 07:24:58 CST 2009


On Sun, Nov 29, 2009 at 12:10 AM, Laurent <laurent at vromman.org> wrote:
> Yes, it would be. The fact is that makes a zero byte size HeapAlloc.
> I'm not really sure how and why it is supposed to work in this case,

It works fine, HeapReAlloc handles it ok, too.
On Windows, it actually returns a heap block.
(On Posix, it can return null, but realloc still works
either way.)

Really, one would probably prefer to reduce the number of
reallocs by allocating extra entries initially (say, four)
and then doubling each time that wasn't enough, but
for now let's go with the simplest possible change that
will make your code correct.
- Dan



More information about the wine-devel mailing list