1 |
fauli 11/01/18 15:44:20 |
2 |
|
3 |
Modified: erlang-14.2.1-fortify.patch |
4 |
Log: |
5 |
Update fix for FORTIFY_SOURCE failure on 64bit as taken from upstream |
6 |
|
7 |
(Portage version: 2.1.9.25/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 dev-lang/erlang/files/erlang-14.2.1-fortify.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/erlang/files/erlang-14.2.1-fortify.patch?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/erlang/files/erlang-14.2.1-fortify.patch?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/erlang/files/erlang-14.2.1-fortify.patch?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: erlang-14.2.1-fortify.patch |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/erlang/files/erlang-14.2.1-fortify.patch,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- erlang-14.2.1-fortify.patch 12 Jan 2011 09:35:47 -0000 1.1 |
23 |
+++ erlang-14.2.1-fortify.patch 18 Jan 2011 15:44:20 -0000 1.2 |
24 |
@@ -1,19 +1,36 @@ |
25 |
|
26 |
-Erlang 14B01 (aka 14.2.1 in Gentoo) fails with 64bit arches and FORTIFY_SOURCE=2 or greater, consisting of a buffer overflow warning. |
27 |
+Erlang 14B01 (aka 14.2.1 in Gentoo) fails with 64bit arches and FORTIFY_SOURCE=2 or greater, consisting of a buffer overflow warning, which is not an overflow but an overreaction of GCC. |
28 |
|
29 |
Upstream report: http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:2135:bdnooaggpdnbokaboakj |
30 |
-Taken from PLD Linux: http://cvs.pld-linux.org/cgi-bin/cvsweb/packages/erlang/erlang-fortify.patch |
31 |
+Upstream fix: https://github.com/erlang/otp/commit/3b7fd1030711ad56fa45d18dc6e0f1d0beee2399 |
32 |
|
33 |
http://bugs.gentoo.org/show_bug.cgi?id=348559 |
34 |
|
35 |
---- otp_src_R14B01/erts/emulator/drivers/common/efile_drv.c |
36 |
-+++ otp_src_R14B01/erts/emulator/drivers/common/efile_drv.c |
37 |
-@@ -174,7 +174,7 @@ |
38 |
- |
39 |
- #else |
40 |
- # define FILENAME_BYTELEN(Str) strlen(Str) |
41 |
--# define FILENAME_COPY(To,From) strcpy(To,From) |
42 |
-+# define FILENAME_COPY(To,From) memcpy(To,From,strlen(From)+1) |
43 |
- # define FILENAME_CHARSIZE 1 |
44 |
- #endif |
45 |
- |
46 |
+--- erts/emulator/drivers/common/efile_drv.c |
47 |
++++ erts/emulator/drivers/common/efile_drv.c |
48 |
+@@ -385,7 +385,6 @@ |
49 |
+ ErlDrvBinary *binp; |
50 |
+ int size; |
51 |
+ int offset; |
52 |
+- char name[1]; |
53 |
+ } read_file; |
54 |
+ struct { |
55 |
+ struct t_readdir_buf *first_buf; |
56 |
+@@ -1117,7 +1116,7 @@ |
57 |
+ Sint64 size; |
58 |
+ |
59 |
+ if (! (d->result_ok = |
60 |
+- efile_openfile(&d->errInfo, d->c.read_file.name, |
61 |
++ efile_openfile(&d->errInfo, d->b, |
62 |
+ EFILE_MODE_READ, &fd, &size))) { |
63 |
+ goto done; |
64 |
+ } |
65 |
+@@ -3071,7 +3070,7 @@ |
66 |
+ d->command = command; |
67 |
+ d->reply = !0; |
68 |
+ /* Copy name */ |
69 |
+- FILENAME_COPY(d->c.read_file.name, filename); |
70 |
++ FILENAME_COPY(d->b, filename); |
71 |
+ d->c.read_file.binp = NULL; |
72 |
+ d->invoke = invoke_read_file; |
73 |
+ d->free = free_read_file; |