simple GdkPixbuf fix
- From: Ron Steinke <rsteinke w-link net>
- To: gtk-devel-list gnome org
- Subject: simple GdkPixbuf fix
- Date: Tue, 12 Jun 2001 12:38:11 -0700
This patch is a simple fix to some ugly code in gdk-pixbuf-data.c.
Does domeone want to commit this? If not, I'll stick it in bugzilla when
it comes up again.
Ron Steinke
Index: gtk+/gdk-pixbuf/gdk-pixbuf-data.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk-pixbuf/gdk-pixbuf-data.c,v
retrieving revision 1.15
diff -u -r1.15 gdk-pixbuf-data.c
--- gtk+/gdk-pixbuf/gdk-pixbuf-data.c 2001/02/06 14:46:17 1.15
+++ gtk+/gdk-pixbuf/gdk-pixbuf-data.c 2001/06/12 19:30:41
@@ -144,10 +144,7 @@
length -= 12;
- /* There's some better way like G_MAXINT/height > rowstride
- * but I'm not sure it works, so stick to this for now.
- */
- if (((double)height) * ((double)rowstride) > (double)G_MAXINT) {
+ if ((G_MAXINT - 1) / height >= rowstride) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]