forked from AuroraMiddleware/gtk
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)
This commit is contained in:
parent
f9d267ae80
commit
c2aa25d703
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user