Check-in [2c5a04569e]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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).
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2c5a04569e9f402b3ba6264c57acf43f3ac62f06
User & Date: jacob 2006-02-11 12:00:23.000
Context
2006-02-11
12:29
Failure to connect to a Unix-domain socket could cause a segfault. Fixed. check-in: 54ac07652e user: jacob tags: trunk
12:00
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). check-in: 2c5a04569e user: jacob tags: trunk
2006-02-10
14:57
Oops. Since r6546, old "Special Commands" menus weren't being deleted from the context menu, and they tended to pile up. check-in: 963c5c5a87 user: jacob tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to x11fwd.c.
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
}

/* Find the right display, returns an allocated string */
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)
	    /* plausible default for all platforms */
	    ret = dupstr(":0");
    } else
	ret = dupstr(display);
    if(ret[0] == ':') {
	/* no transport specified, use whatever we think is best */
	char *s = dupcat(platform_x11_best_transport, ret, (char *)0);







|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
}

/* Find the right display, returns an allocated string */
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 || !*ret)
	    /* plausible default for all platforms */
	    ret = dupstr(":0");
    } else
	ret = dupstr(display);
    if(ret[0] == ':') {
	/* no transport specified, use whatever we think is best */
	char *s = dupcat(platform_x11_best_transport, ret, (char *)0);