[evince/gdbus] [shell] Safely get the screen from the message arguments
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gdbus] [shell] Safely get the screen from the message arguments
- Date: Mon, 10 May 2010 10:20:07 +0000 (UTC)
commit 2cac858eb2e88536990b6d272daa996ec07640fb
Author: Christian Persch <chpe gnome org>
Date: Mon May 10 01:30:11 2010 +0200
[shell] Safely get the screen from the message arguments
Check for out-of-bounds.
shell/ev-application.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-application.c b/shell/ev-application.c
index a09906c..050b396 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -644,7 +644,9 @@ method_call_cb (GDBusConnection *connection,
}
g_variant_iter_free (iter);
- if (display != NULL)
+ if (display != NULL &&
+ screen_number >= 0 &&
+ screen_number < gdk_display_get_n_screens (display))
screen = gdk_display_get_screen (display, screen_number);
else
screen = gdk_screen_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]