blob: 05eab35d2cfbe5c78d4fe678302cb053323b6fb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
commit d0cd013653360f6f11e3b5dbdbbf3788a5c08b02
Author: Gregg Townsend <gmt@cs.arizona.edu>
Date: Thu Dec 4 15:37:39 2014 -0700
Handle $DISPLAY longer than 63 characters.
First seen as a problem on Macintosh OS X 10.10 ("Yosemite").
Side effects revealed other bugs in cross-display CopyArea and
gamma correction.
diff --git a/src/h/graphics.h b/src/h/graphics.h
--- a/src/h/graphics.h
+++ b/src/h/graphics.h
@@ -201,7 +201,7 @@
typedef struct _wdisplay {
int refcount;
int serial; /* serial # */
- char name[MAXDISPLAYNAME];
+ char *name;
Display * display;
Visual * visual;
GC icongc;
diff --git a/src/h/xwin.h b/src/h/xwin.h
--- a/src/h/xwin.h
+++ b/src/h/xwin.h
@@ -73,7 +73,6 @@
*/
#define WMAXCOLORS 256
#define MAXCOLORNAME 40
-#define MAXDISPLAYNAME 64
#define CSHARED 0
#define CMUTABLE 1
#define NUMCURSORSYMS 78
diff --git a/src/runtime/rxrsc.ri b/src/runtime/rxrsc.ri
--- a/src/runtime/rxrsc.ri
+++ b/src/runtime/rxrsc.ri
@@ -376,7 +376,7 @@
GRFX_ALLOC(wd, _wdisplay);
- strcpy(wd->name,s);
+ wd->name = salloc(s);
wd->display = XOpenDisplay((*s=='\0') ? NULL : s);
if (wd->display == NULL) {
|