diff options
Diffstat (limited to 'main/fortify-headers')
-rw-r--r-- | main/fortify-headers/0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch | 56 | ||||
-rw-r--r-- | main/fortify-headers/APKBUILD | 14 |
2 files changed, 5 insertions, 65 deletions
diff --git a/main/fortify-headers/0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch b/main/fortify-headers/0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch deleted file mode 100644 index 17d0624ee2..0000000000 --- a/main/fortify-headers/0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 31d62b60c5b4f1baa795537da898a83e39be9dd1 Mon Sep 17 00:00:00 2001 -From: Natanael Copa <ncopa@alpinelinux.org> -Date: Thu, 7 May 2015 14:41:36 +0200 -Subject: [PATCH fortify-headers] fix realpath when stdlib.h is included before - limits.h -To: sin@2f30.org - -If program includes stdlib.h before limits.h without _XOPEN_SOURCE, -_GNU_SOURCE or _BSD_SOURCE explicitly set, then will it always trigger -the trap with musl libc. - -This is becase stdlib.h will pull in features.h which will set -_GNU_SOURCE. This means that the fortify stdlib.h will not include -limits.h but it will still trigger the fortified realpath(), but without -PATH_MAX set. - -We fix this by including system stdlib.h before testing if limits.h -should be included. - -Since PATH_MAX is known at compile time we can also error at compile -time, instead of compiling a broken realpath(). ---- - include/stdlib.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/stdlib.h b/include/stdlib.h -index 22f1f2b..6629652 100644 ---- a/include/stdlib.h -+++ b/include/stdlib.h -@@ -1,12 +1,12 @@ - #ifndef _FORTIFY_STDLIB_H - #define _FORTIFY_STDLIB_H - -+#include_next <stdlib.h> -+ - #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - #include_next <limits.h> - #endif - --#include_next <stdlib.h> -- - #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 - - #ifdef __cplusplus -@@ -23,7 +23,7 @@ char *realpath(const char *path, char *resolved) - - if (resolved) { - #ifndef PATH_MAX -- __builtin_trap(); -+# error PATH_MAX unset. A fortified realpath will not work. - #else - bos = __builtin_object_size(resolved, 0); - if (PATH_MAX > bos) --- -2.4.0 - diff --git a/main/fortify-headers/APKBUILD b/main/fortify-headers/APKBUILD index 2092782638..a2bbd52aac 100644 --- a/main/fortify-headers/APKBUILD +++ b/main/fortify-headers/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Timo Teräs <timo.teras@iki.fi> # Maintainer: Timo Teräs <timo.teras@iki.fi> pkgname=fortify-headers -pkgver=0.4 -pkgrel=1 +pkgver=0.5 +pkgrel=0 pkgdesc="standalone fortify source implementation" url="http://git.2f30.org/fortify-headers/" arch="noarch" @@ -13,7 +13,6 @@ makedepends="$depends_dev" install="" subpackages="" source="http://dl.2f30.org/releases/$pkgname-$pkgver.tar.gz - 0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch " _builddir="$srcdir"/$pkgname-$pkgver @@ -37,9 +36,6 @@ package() { rm -f "$pkgdir"/usr/lib/*.la } -md5sums="99b34bbd925cbfe383252fe107cafece fortify-headers-0.4.tar.gz -47e6831fc0fa84075f5750b47b13d888 0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch" -sha256sums="fedfbd951bf4d4bd30d32bef20710d6124c004037df52059a274c090c1f11a0a fortify-headers-0.4.tar.gz -1216858e96afa30b093ec420d0b6d8943036d8816f54a59e3fa6ef5b5b0ee32e 0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch" -sha512sums="669bf35df5278d4557caa2c8f28e33fe3e4a03c4267eed2cc8638dcb8e705d8797e487fbb524d9ff919e2752f1dc817cef9d41f14ceb46d520661e3d2301c5f2 fortify-headers-0.4.tar.gz -5364518842709e2c25baaf9a8b7651db422f2d37c64fac690f671daa157214192933ac1821a29d31d8ddfd49dd8e2625e3dfbe6fdba3b2b899c533f0f73e4699 0001-fix-realpath-when-stdlib.h-is-included-before-limits.patch" +md5sums="56487ae93e3f45ffc0736afd3ebce549 fortify-headers-0.5.tar.gz" +sha256sums="4564f0ee9cb7c789b5a827d21a0d3b6da9df61fcb7ba31b711999f638e9e913a fortify-headers-0.5.tar.gz" +sha512sums="951e3a5771c3cf9b2fe248e62badfc6699f0a05b8967f3982d279de8473501c66a6d1c17d7b42c90ef8bd303c06a642d7bdfea334caef892c90a15c45d4bb1c4 fortify-headers-0.5.tar.gz" |