[Mono-bugs] [Bug 72605][Wis] Changed - gdiplus must check malloc results

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Feb 2005 12:57:42 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lupus@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=72605

--- shadow/72605	2005-02-16 12:51:37.000000000 -0500
+++ shadow/72605.tmp.12846	2005-02-16 12:57:42.000000000 -0500
@@ -563,6 +563,12 @@
 		scan0 = GdipAlloc (stride * height);
 		memset (scan0, 0, stride * height);
 
 That is really inefficient when the memory is mmap'd from the system 
 (which happens if it is more than 128 kb of data on glibc iirc). 
 Better to use calloc (or g_new0)
+
+------- Additional Comments From lupus@ximian.com  2005-02-16 12:57 -------
+g_new and g_malloc should absolutely not be used in libgdiplus.
+They assert when memory is not available, which is not what
+'gracefully' means.
+