Author: spouliot
Date: 2006-10-06 09:12:44 -0400 (Fri, 06 Oct 2006)
New Revision: 66348
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/font.c
Log:
2006-10-06 Sebastien Pouliot <[EMAIL PROTECTED]>
* font.c: Always zeroize LOGFONT facename even when we error out. This
removes a lot of warnings from valgrind when running unit tests.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2006-10-06 12:00:17 UTC (rev 66347)
+++ trunk/libgdiplus/src/ChangeLog 2006-10-06 13:12:44 UTC (rev 66348)
@@ -1,3 +1,8 @@
+2006-10-06 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * font.c: Always zeroize LOGFONT facename even when we error out. This
+ removes a lot of warnings from valgrind when running unit tests.
+
2006-10-05 Sebastien Pouliot <[EMAIL PROTECTED]>
* graphics.c: Fix StringAlignmentCenter in GdipDrawString. Half fix
Modified: trunk/libgdiplus/src/font.c
===================================================================
--- trunk/libgdiplus/src/font.c 2006-10-06 12:00:17 UTC (rev 66347)
+++ trunk/libgdiplus/src/font.c 2006-10-06 13:12:44 UTC (rev 66348)
@@ -838,8 +838,11 @@
/* will be changed back to 1 inside System.Drawing */
logFont->lfCharSet = 0;
- if (!font || !graphics)
+ if (!font || !graphics) {
+ int size = (ucs2) ? 2 * LF_FACESIZE : LF_FACESIZE;
+ memset (logFont->lfFaceName, 0, size);
return InvalidParameter;
+ }
logFont->lfHeight = -(font->sizeInPixels);
logFont->lfWidth = 0;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches