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

Laurent laurent at vromman.org
Sun Nov 29 13:20:03 CST 2009


On Sun, Nov 29, 2009 at 2:24 PM, Dan Kegel <dank at kegel.com> wrote:
> 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.)
>
Thank you for the precision. Let apply your patch in this case. It's
not necessary that I reproduce the same with the name on it as the
only difference.

> 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
>


Laurent



More information about the wine-devel mailing list