From f41012080fa79c408d0277f7b68d4b2fe14dd69c Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 26 Jan 2021 12:56:32 +0000 Subject: [PATCH] Validate arguments We're just assuming everything is not NULL or with a valid type. --- gdk/gdksurface.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index aaeb6d21b4..31c5b44b73 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -2984,6 +2984,11 @@ gdk_surface_translate_coordinates (GdkSurface *from, int x1, y1, x2, y2; GdkSurface *f, *t; + g_return_val_if_fail (GDK_IS_SURFACE (from), FALSE); + g_return_val_if_fail (GDK_IS_SURFACE (to), FALSE); + g_return_val_if_fail (x != NULL, FALSE); + g_return_val_if_fail (y != NULL, FALSE); + in_x = *x; in_y = *y;