summaryrefslogtreecommitdiff
path: root/aterm/aterm-1.0.1-display-security-issue.patch
blob: b594560714bb728b48eca9236a637e91494697e7 (plain)
    1 # http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-1142
    2 # http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-terms/aterm/
    3 
    4 --- aterm-1.0.1/src/main.c	2007-08-01 16:08:29.000000000 +0200
    5 +++ aterm-1.0.1.new/src/main.c	2008-05-03 14:06:52.000000000 +0200
    6 @@ -2057,10 +2057,6 @@
    7   */
    8      get_options(argc, argv);
    9  
   10 -	if( display_name == NULL )
   11 -    	if ((display_name = getenv("DISPLAY")) == NULL)
   12 -			display_name = ":0";
   13 -
   14  #ifdef HAVE_AFTERSTEP
   15  #ifdef MyArgs_IS_MACRO	
   16      MyArgsPtr = safecalloc(1, sizeof(ASProgArgs) );
   17 @@ -2102,7 +2098,9 @@
   18  	Xdisplay = XOpenDisplay(display_name);
   19      
   20  	if (!Xdisplay) {
   21 -		print_error("can't open display %s", display_name);
   22 +		print_error("can't open display %s", display_name?display_name:
   23 +				getenv("DISPLAY")?getenv("DISPLAY"):
   24 +				"as no -d given and DISPLAY not set");
   25  		exit(EXIT_FAILURE);
   26      }
   27    /* changed from _MOTIF_WM_INFO - Vaevictus - gentoo bug #139554 */

Generated by cgit