[evince] [shell] Safely get the screen from the message arguments
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [shell] Safely get the screen from the message arguments
- Date: Tue, 25 May 2010 07:44:31 +0000 (UTC)
commit bf81d8f6045121a886dd37cde1e25c2e4e9da233
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]