summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2002-10-07 15:16:06 +0000
committerBill Haneman <billh@src.gnome.org>2002-10-07 15:16:06 +0000
commit4494b086fd5feeccd84abb79846149850cdaf83c (patch)
tree50aa45a2ce2dc723901e38b0e382e87e75e14405
parent285c8f78fc52a07a59593219d8d4f195e3470eb5 (diff)
downloadgdk-pixbuf-4494b086fd5feeccd84abb79846149850cdaf83c.tar.gz
gdk_image_get_pixel, gdk_image_put_pixel: Fixed sense of bounds checks.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-2-106
-rw-r--r--ChangeLog.pre-2-26
-rw-r--r--ChangeLog.pre-2-46
-rw-r--r--ChangeLog.pre-2-66
-rw-r--r--ChangeLog.pre-2-86
-rw-r--r--gdk/linux-fb/gdkimage-fb.c8
-rw-r--r--gdk/win32/gdkimage-win32.c8
-rw-r--r--gdk/x11/gdkdrawable-x11.c2
-rw-r--r--gdk/x11/gdkimage-x11.c8
10 files changed, 49 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d1c91de8..9f19f3156 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002 Bill Haneman <bill.haneman@sun.com>
+
+ * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c
+ gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel):
+ (gdk_image_put_pixel): Fixed sense of bounds checks.
+
Sun Oct 6 21:23:29 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 1d1c91de8..9f19f3156 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002 Bill Haneman <bill.haneman@sun.com>
+
+ * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c
+ gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel):
+ (gdk_image_put_pixel): Fixed sense of bounds checks.
+
Sun Oct 6 21:23:29 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 1d1c91de8..9f19f3156 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002 Bill Haneman <bill.haneman@sun.com>
+
+ * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c
+ gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel):
+ (gdk_image_put_pixel): Fixed sense of bounds checks.
+
Sun Oct 6 21:23:29 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 1d1c91de8..9f19f3156 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002 Bill Haneman <bill.haneman@sun.com>
+
+ * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c
+ gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel):
+ (gdk_image_put_pixel): Fixed sense of bounds checks.
+
Sun Oct 6 21:23:29 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 1d1c91de8..9f19f3156 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002 Bill Haneman <bill.haneman@sun.com>
+
+ * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c
+ gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel):
+ (gdk_image_put_pixel): Fixed sense of bounds checks.
+
Sun Oct 6 21:23:29 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 1d1c91de8..9f19f3156 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Mon Oct 7 16:07:52 2002 Bill Haneman <bill.haneman@sun.com>
+
+ * gdk/x11/gdkimage-x11.c gdk/linux-fb/gdkimage-x11.c
+ gdk/win32/gdkimage-x11.c: (gdk_image_get_pixel):
+ (gdk_image_put_pixel): Fixed sense of bounds checks.
+
Sun Oct 6 21:23:29 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcontainer.[ch] gtk/gtkbox.[ch] gtk/gtkhbox.[ch]
diff --git a/gdk/linux-fb/gdkimage-fb.c b/gdk/linux-fb/gdkimage-fb.c
index a624b9df4..265be6231 100644
--- a/gdk/linux-fb/gdkimage-fb.c
+++ b/gdk/linux-fb/gdkimage-fb.c
@@ -264,8 +264,8 @@ gdk_image_get_pixel (GdkImage *image,
GdkImagePrivateFB *private;
g_return_val_if_fail (image != NULL, 0);
- g_return_val_if_fail (x < 0 || x >= image->width, 0);
- g_return_val_if_fail (y < 0 || y >= image->height, 0);
+ g_return_val_if_fail (x >= 0 && x < image->width, 0);
+ g_return_val_if_fail (y >= 0 && y < image->height, 0);
private = GDK_IMAGE_PRIVATE_DATA (image);
@@ -298,8 +298,8 @@ gdk_image_put_pixel (GdkImage *image,
guchar *ptr = image->mem;
g_return_if_fail (image != NULL);
- g_return_if_fail (x < 0 || x >= image->width);
- g_return_if_fail (y < 0 || y >= image->height);
+ g_return_if_fail (x >= 0 && x < image->width);
+ g_return_if_fail (y >= 0 && y < image->height);
switch (image->depth)
{
diff --git a/gdk/win32/gdkimage-win32.c b/gdk/win32/gdkimage-win32.c
index 99a35d3c1..9f4f6784f 100644
--- a/gdk/win32/gdkimage-win32.c
+++ b/gdk/win32/gdkimage-win32.c
@@ -265,8 +265,8 @@ gdk_image_get_pixel (GdkImage *image,
guchar *pixelp;
g_return_val_if_fail (image != NULL, 0);
- g_return_val_if_fail (x < 0 || x >= image->width, 0);
- g_return_val_if_fail (y < 0 || y >= image->height, 0);
+ g_return_val_if_fail (x >= 0 && x < image->width, 0);
+ g_return_val_if_fail (y >= 0 && y < image->height, 0);
if (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
return 0;
@@ -313,8 +313,8 @@ gdk_image_put_pixel (GdkImage *image,
guchar *pixelp;
g_return_if_fail (image != NULL);
- g_return_if_fail (x < 0 || x >= image->width);
- g_return_if_fail (y < 0 || y >= image->height);
+ g_return_if_fail (x >= 0 && x < image->width);
+ g_return_if_fail (y >= 0 && y < image->height);
if (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
return;
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index ed07cace1..6b0a78115 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -1255,7 +1255,7 @@ draw_with_images (GdkDrawable *drawable,
GDK_PIXMAP_XID (pix),
mask_format, 0, NULL);
- dest_pict = gdk_x11_drawable_get_picture (drawable);
+ dest_pict = gdk_x11_drawable_get_picture (drawable);
pix_gc = gdk_gc_new (pix);
diff --git a/gdk/x11/gdkimage-x11.c b/gdk/x11/gdkimage-x11.c
index 52fbad19b..6db834502 100644
--- a/gdk/x11/gdkimage-x11.c
+++ b/gdk/x11/gdkimage-x11.c
@@ -697,8 +697,8 @@ gdk_image_get_pixel (GdkImage *image,
GdkImagePrivateX11 *private;
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
- g_return_val_if_fail (x < 0 || x >= image->width, 0);
- g_return_val_if_fail (y < 0 || y >= image->height, 0);
+ g_return_val_if_fail (x >= 0 && x < image->width, 0);
+ g_return_val_if_fail (y >= 0 && y < image->height, 0);
private = PRIVATE_DATA (image);
@@ -719,8 +719,8 @@ gdk_image_put_pixel (GdkImage *image,
GdkImagePrivateX11 *private;
g_return_if_fail (GDK_IS_IMAGE (image));
- g_return_if_fail (x < 0 || x >= image->width);
- g_return_if_fail (y < 0 || y >= image->height);
+ g_return_if_fail (x >= 0 && x < image->width);
+ g_return_if_fail (y >= 0 && y < image->height);
private = PRIVATE_DATA (image);