Contents of /trunk/libarchive/patches/libarchive-2.7.0-fortified-sources.patch
Parent Directory | Revision Log
Revision 842 -
(show annotations)
(download)
Thu Jun 11 18:52:50 2009 UTC (15 years, 3 months ago) by niro
File size: 1057 byte(s)
Thu Jun 11 18:52:50 2009 UTC (15 years, 3 months ago) by niro
File size: 1057 byte(s)
-added libarchive patches
1 | From 8f08a4f3c67746fce484f0666e1828988ef72303 Mon Sep 17 00:00:00 2001 |
2 | From: =?utf-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> |
3 | Date: Fri, 17 Apr 2009 00:47:02 +0200 |
4 | Subject: [PATCH 2/2] Make sure to use the mode parameter of open(2). |
5 | |
6 | With _FORTIFY_SOURCE=2 on recent glibc versions, using open(2) with O_CREAT |
7 | and no mode parameter causes a build failure. Avoid this. |
8 | --- |
9 | libarchive/test/test_write_disk_failures.c | 2 +- |
10 | 1 files changed, 1 insertions(+), 1 deletions(-) |
11 | |
12 | diff --git a/libarchive/test/test_write_disk_failures.c b/libarchive/test/test_write_disk_failures.c |
13 | index c0e1f8f..c9dc824 100644 |
14 | --- a/libarchive/test/test_write_disk_failures.c |
15 | +++ b/libarchive/test/test_write_disk_failures.c |
16 | @@ -48,7 +48,7 @@ DEFINE_TEST(test_write_disk_failures) |
17 | assertEqualInt(0, mkdir("dir", 0555)); |
18 | |
19 | /* Can we? */ |
20 | - fd = open("dir/testfile", O_WRONLY | O_CREAT); |
21 | + fd = open("dir/testfile", O_WRONLY | O_CREAT, 0777); |
22 | if (fd >= 0) { |
23 | /* Apparently, we can, so the test below won't work. */ |
24 | close(fd); |
25 | -- |
26 | 1.6.2.3 |
27 |