From: Jacob Nevins Date: Sat, 11 Feb 2006 18:00:23 +0000 (+0000) Subject: A zero-length return from platform_get_x_display() (for instance, a X-Git-Tag: r8855-g4f798d~461 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5aa67220d02994c82e8d622996a50f44f5266c99;p=PuTTY_svn.git A zero-length return from platform_get_x_display() (for instance, a zero-length DISPLAY variable in the environment) caused an assertion failure when X11 forwarding was attempted. Fixed (now treated the same as a NULL return, e.g., a non-existent DISPLAY variable). git-svn-id: http://svn.tartarus.org/sgt/putty@6549 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/x11fwd.c b/x11fwd.c index 13c6823e..6e04abe1 100644 --- a/x11fwd.c +++ b/x11fwd.c @@ -245,7 +245,7 @@ char *x11_display(const char *display) { char *ret; if(!display || !*display) { /* try to find platform-specific local display */ - if((ret = platform_get_x_display())==0) + if((ret = platform_get_x_display())==0 || !*ret) /* plausible default for all platforms */ ret = dupstr(":0"); } else