Commit c2aa25d7 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c Add bounds-checking

Tue Sep 24 16:24:22 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
        * gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
        Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
parent f9d267ae
Tue Sep 24 16:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
* gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
Tue Sep 24 16:04:44 2002 Owen Taylor <otaylor@redhat.com>
* gdkprivate-x11.h gdkcolor-x11.c gdkvisual-x11.c
......
Tue Sep 24 16:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
* gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
Tue Sep 24 16:04:44 2002 Owen Taylor <otaylor@redhat.com>
* gdkprivate-x11.h gdkcolor-x11.c gdkvisual-x11.c
......
Tue Sep 24 16:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
* gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
Tue Sep 24 16:04:44 2002 Owen Taylor <otaylor@redhat.com>
* gdkprivate-x11.h gdkcolor-x11.c gdkvisual-x11.c
......
Tue Sep 24 16:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
* gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
Tue Sep 24 16:04:44 2002 Owen Taylor <otaylor@redhat.com>
* gdkprivate-x11.h gdkcolor-x11.c gdkvisual-x11.c
......
Tue Sep 24 16:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
* gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
Tue Sep 24 16:04:44 2002 Owen Taylor <otaylor@redhat.com>
* gdkprivate-x11.h gdkcolor-x11.c gdkvisual-x11.c
......
Tue Sep 24 16:24:22 2002 Owen Taylor <otaylor@redhat.com>
* gdk/win32/gdkimage-win32.c gdk/x11/gdkimage-x11.c
* gdk/linux-fb/gdkimage-fb.c (gdk_image_put/get_pixel):
Add bounds-checking g_return_if_fail(). (Olexiy Avramchenko)
Tue Sep 24 16:04:44 2002 Owen Taylor <otaylor@redhat.com>
* gdkprivate-x11.h gdkcolor-x11.c gdkvisual-x11.c
......
......@@ -263,7 +263,9 @@ gdk_image_get_pixel (GdkImage *image,
{
GdkImagePrivateFB *private;
g_return_val_if_fail (image != NULL, 0);
g_return_val_if_fail (image != NULL);
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);
......@@ -296,6 +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);
switch (image->depth)
{
......
......@@ -264,7 +264,9 @@ gdk_image_get_pixel (GdkImage *image,
{
guchar *pixelp;
g_return_val_if_fail (GDK_IS_IMAGE (image), 0);
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);
if (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
return 0;
......@@ -311,6 +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);
if (!(x >= 0 && x < image->width && y >= 0 && y < image->height))
return;
......
......@@ -697,6 +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);
private = PRIVATE_DATA (image);
......@@ -717,6 +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);
private = PRIVATE_DATA (image);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment