Author: spouliot
Date: 2007-01-12 13:30:49 -0500 (Fri, 12 Jan 2007)
New Revision: 70934
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/icocodec.c
Log:
2007-01-12 Sebastien Pouliot <[EMAIL PROTECTED]>
* icocodec.c: Fix another endian issue and free the bitmap (not just
the palette) in case of an error.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2007-01-12 17:50:27 UTC (rev 70933)
+++ trunk/libgdiplus/src/ChangeLog 2007-01-12 18:30:49 UTC (rev 70934)
@@ -1,3 +1,8 @@
+2007-01-12 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * icocodec.c: Fix another endian issue and free the bitmap (not just
+ the palette) in case of an error.
+
2007-01-12 Sebastien Pouliot <[EMAIL PROTECTED]>
* bitmap.c: Fix HBITMAP support in GdipCreateBitmapFromHBITMAP and
Modified: trunk/libgdiplus/src/icocodec.c
===================================================================
--- trunk/libgdiplus/src/icocodec.c 2007-01-12 17:50:27 UTC (rev 70933)
+++ trunk/libgdiplus/src/icocodec.c 2007-01-12 18:30:49 UTC (rev 70934)
@@ -127,7 +127,8 @@
/* WORD ICONDIR.idType / resource type, MUST be 1 for icons */
if (gdip_read_ico_data (pointer, p, sizeof (WORD), useFile) != sizeof
(WORD))
goto error;
- if (w != 1)
+ i = (b[1] << 8 | b[0]);
+ if (i != 1)
goto error;
/* WORD ICONDIR.idCount / number of icons, must be greater than 0 */
@@ -279,8 +280,8 @@
return Ok;
error:
- if (result->active_bitmap->palette)
- GdipFree (result->active_bitmap->palette);
+ if (result)
+ GdipDisposeImage (result);
if (xor_data)
GdipFree (xor_data);
if (and_data)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches