39ae6228d0
Fixes CVE-2008-1142.
35 lines
1.2 KiB
Text
35 lines
1.2 KiB
Text
$NetBSD: patch-aa,v 1.5 2008/05/27 21:46:53 tonnerre Exp $
|
|
|
|
--- src/main.c.orig 2005-06-20 18:10:19.000000000 +0200
|
|
+++ src/main.c
|
|
@@ -1037,12 +1037,10 @@ resize_window(XEvent* ev)
|
|
XConfigureEvent *xconf = &(ev->xconfigure);
|
|
|
|
while( XCheckTypedWindowEvent( Xdisplay, TermWin.parent, ConfigureNotify, ev ) );
|
|
- fprintf( stderr, "config_geom = %dx%d\n", xconf->width, xconf->height );
|
|
resize_window1(xconf->width, xconf->height);
|
|
#if 1
|
|
XTranslateCoordinates (Xdisplay, TermWin.parent, Xroot, 0, 0, &root_x, &root_y, &wdumm);
|
|
|
|
- fprintf( stderr, "root_geom = %dx%d%+d%+d, root_size = %dx%d\n", xconf->width, xconf->height, root_x, root_y, XdisplayWidth, XdisplayHeight );
|
|
TermWin.root_x = root_x ;
|
|
TermWin.root_y = root_y ;
|
|
TermWin.root_width = xconf->width ;
|
|
@@ -2047,9 +2045,14 @@ main(int argc, char *argv[])
|
|
*/
|
|
get_options(argc, argv);
|
|
|
|
- if( display_name == NULL )
|
|
- if ((display_name = getenv("DISPLAY")) == NULL)
|
|
- display_name = ":0";
|
|
+ if( display_name == NULL )
|
|
+ display_name = getenv("DISPLAY");
|
|
+
|
|
+ if( display_name == NULL )
|
|
+ {
|
|
+ print_error("DISPLAY variable not set and none given");
|
|
+ exit(EXIT_FAILURE);
|
|
+ }
|
|
|
|
#ifdef HAVE_AFTERSTEP
|
|
#ifdef MyArgs_IS_MACRO
|