Author: gonzalo
Date: 2006-06-27 17:54:07 -0400 (Tue, 27 Jun 2006)
New Revision: 62098
Modified:
trunk/libgdiplus/src/ChangeLog
trunk/libgdiplus/src/bitmap.c
Log:
2006-06-27 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* bitmap.c: avoid invalid read when we have a 24bpp format.
Modified: trunk/libgdiplus/src/ChangeLog
===================================================================
--- trunk/libgdiplus/src/ChangeLog 2006-06-27 21:50:36 UTC (rev 62097)
+++ trunk/libgdiplus/src/ChangeLog 2006-06-27 21:54:07 UTC (rev 62098)
@@ -1,3 +1,7 @@
+2006-06-27 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * bitmap.c: avoid invalid read when we have a 24bpp format.
+
2006-06-26 Sebastien Pouliot <[EMAIL PROTECTED]>
* font.c: Don't read past allocated memory.
Modified: trunk/libgdiplus/src/bitmap.c
===================================================================
--- trunk/libgdiplus/src/bitmap.c 2006-06-27 21:50:36 UTC (rev 62097)
+++ trunk/libgdiplus/src/bitmap.c 2006-06-27 21:54:07 UTC (rev 62098)
@@ -1473,7 +1473,13 @@
*
* Note that pixel streams do not support 48- and 64-bit data
at this time.
*/
- ret = *(unsigned int *)state->scan;
+ if (state->pixels_per_byte == -4) {
+ ret = *(unsigned int *)state->scan;
+ } else {
+ ret = state->scan [0];
+ ret += (state->scan [1] << 8);
+ ret += (state->scan [2] << 16);
+ }
/* Special case: 24-bit data needs to have the cairo format
alpha component forced
* to 0xFF, or many operations will do nothing (or do strange
things if the alpha
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches