summaryrefslogtreecommitdiff
blob: 94aa5a02d82269ae7d4ac03992ba3888ffc6d0b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
=== modified file 'parse_m4.c'
--- ctwm-4.0.1____orig/parse_m4.c	2016-05-03 20:19:31 +0000
+++ ctwm-4.0.1____MaFu/parse_m4.c	2017-06-13 10:37:46 +0000
@@ -140,12 +140,15 @@
 	char client[MAXHOSTNAME], server[MAXHOSTNAME], *colon;
 	struct hostent *hostname;
 	char *vc, *color;
-	static char tmp_name[] = "/tmp/ctwmrcXXXXXX";
+#define TMPLFILE "/tmp/ctwmrcXXXXXX"
+	static char tmp_name[sizeof(TMPLFILE)];
 	int fd;
 	FILE *tmpf;
 	char *user;
 
 	/* Create temp file */
+	strcpy(tmp_name, TMPLFILE);
+#undef TMPLFILE
 	fd = mkstemp(tmp_name);
 	if(fd < 0) {
 		perror("mkstemp failed in m4_defs");