1 |
jer 09/05/02 16:27:00 |
2 |
|
3 |
Added: socat-1.7.1.0-fixsetenv.patch |
4 |
Log: |
5 |
Apply patch provided by Todd Stansell to fix crashes on systems without setenv(). |
6 |
(Portage version: 2.2_rc31/cvs/Linux i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-misc/socat/files/socat-1.7.1.0-fixsetenv.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/socat/files/socat-1.7.1.0-fixsetenv.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/socat/files/socat-1.7.1.0-fixsetenv.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: socat-1.7.1.0-fixsetenv.patch |
15 |
=================================================================== |
16 |
diff -r -N -U 3 socat-1.7.1.0/CHANGES socat-1.7.1.0+fixsetenv/CHANGES |
17 |
--- socat-1.7.1.0/CHANGES 2009-04-02 21:20:24.000000000 +0200 |
18 |
+++ socat-1.7.1.0+fixsetenv/CHANGES 2009-04-03 08:42:04.000000000 +0200 |
19 |
@@ -1,4 +1,8 @@ |
20 |
|
21 |
+corrections: |
22 |
+ socat crashed on systems without setenv() (esp. SunOS up to Solaris 9); |
23 |
+ thanks to Todd Stansell for reporting this bug |
24 |
+ |
25 |
####################### V 1.7.1.0: |
26 |
|
27 |
new features: |
28 |
diff -r -N -U 3 socat-1.7.1.0/VERSION socat-1.7.1.0+fixsetenv/VERSION |
29 |
--- socat-1.7.1.0/VERSION 2009-04-02 21:18:17.000000000 +0200 |
30 |
+++ socat-1.7.1.0+fixsetenv/VERSION 2009-04-03 08:38:34.000000000 +0200 |
31 |
@@ -1 +1 @@ |
32 |
-"1.7.1.0" |
33 |
+"1.7.1.0+fixsetenv" |
34 |
diff -r -N -U 3 socat-1.7.1.0/utils.c socat-1.7.1.0+fixsetenv/utils.c |
35 |
--- socat-1.7.1.0/utils.c 2009-04-02 09:32:48.000000000 +0200 |
36 |
+++ socat-1.7.1.0+fixsetenv/utils.c 2009-04-03 08:37:21.000000000 +0200 |
37 |
@@ -75,7 +75,7 @@ |
38 |
if (!overwrite) { |
39 |
if (getenv(name)) return 0; /* already exists */ |
40 |
} |
41 |
- if ((env = Malloc(strlen(name)+strlen(value)+2)) != NULL) { |
42 |
+ if ((env = Malloc(strlen(name)+strlen(value)+2)) == NULL) { |
43 |
return -1; |
44 |
} |
45 |
sprintf(env, "%s=%s", name, value); |