[Mono-devel-list] [PATCH] libgdiplus

Scott Mohekey scott.mohekey at telogis.com
Wed Feb 16 23:18:39 EST 2005


I'm not sure if this is the correct place to be posting this patch.

The patch fixes an invalid out of memory error that occurs when an 
attempt to allocate memory is made with the size being calculated from 
an uninitialized value.


Index: src/bitmap.c
===================================================================
--- src/bitmap.c        (revision 40784)
+++ src/bitmap.c        (working copy)
@@ -353,7 +353,7 @@


        if (destData->Scan0 == NULL) {
-               GpBitmap *data = GdipAlloc (destData->Stride * 
destRect->Height);
+               GpBitmap *data = GdipAlloc (srcData->Stride * 
destRect->Height);

                if (data == NULL)
                        return OutOfMemory;




More information about the Mono-devel-list mailing list