File rxvt-unicode-9.14-CVE-2008-1142-DISPLAY.patch of Package rxvt-unicode

--- src/init.C.orig	2011-12-22 00:48:23.865000426 +0100
+++ src/init.C	2011-12-22 00:50:25.830000425 +0100
@@ -578,13 +578,12 @@
    * Open display, get options/resources and create the window
    */
 
-  if ((rs[Rs_display_name] = getenv ("DISPLAY")) == NULL)
-    rs[Rs_display_name] = ":0";
+  rs[Rs_display_name] = getenv ("DISPLAY");
 
   cmd_argv = get_options (argc, argv);
 
-  if (!(display = displays.get (rs[Rs_display_name])))
-    rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]);
+  if (!rs[Rs_display_name] || !(display = displays.get (rs[Rs_display_name])))
+    rxvt_fatal ("can't open display %s, aborting.\n", (rs[Rs_display_name] ? rs[Rs_display_name] : "as no -display option has been given and DISPLAY is not set"));
 
   // using a local pointer decreases code size a lot
   xa = display->xa;
openSUSE Build Service is sponsored by