forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
toolchain: add fortify-headers, enable FORTIFY_SOURCE by default
Signed-off-by: Steven Barth <[email protected]> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46117 3c298f89-4303-0410-b956-a3cf2f4a3e73
- Loading branch information
Showing
5 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# | ||
# Copyright (C) 2015 OpenWrt.org | ||
# | ||
# This is free software, licensed under the GNU General Public License v2. | ||
# See /LICENSE for more information. | ||
# | ||
include $(TOPDIR)/rules.mk | ||
include $(INCLUDE_DIR)/target.mk | ||
|
||
PKG_NAME:=fortify-headers | ||
PKG_VERSION:=0.6 | ||
PKG_RELEASE=1 | ||
|
||
PKG_SOURCE_URL:=http://dl.2f30.org/releases | ||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||
PKG_MD5SUM:=d85072939ec02a40af282fe3febc6c18 | ||
|
||
include $(INCLUDE_DIR)/toolchain-build.mk | ||
|
||
define Host/Compile | ||
true | ||
endef | ||
|
||
define Host/Install | ||
$(MAKE) -C $(HOST_BUILD_DIR) PREFIX="" DESTDIR="$(TOOLCHAIN_DIR)" install | ||
endef | ||
|
||
$(eval $(call HostBuild)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 1f9848efc8a329cb9a13323cbb94b353d39802c1 Mon Sep 17 00:00:00 2001 | ||
From: Steven Barth <[email protected]> | ||
Date: Mon, 22 Jun 2015 14:36:16 +0200 | ||
Subject: [PATCH] unistd: fix signed / unsigned comparison in getgroups | ||
|
||
Signed-off-by: Steven Barth <[email protected]> | ||
--- | ||
include/unistd.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/include/unistd.h b/include/unistd.h | ||
index 45304e1..5274e22 100644 | ||
--- a/include/unistd.h | ||
+++ b/include/unistd.h | ||
@@ -71,7 +71,7 @@ _FORTIFY_FN(getgroups) int getgroups(int __l, gid_t *__s) | ||
{ | ||
size_t __b = __builtin_object_size(__s, 0); | ||
|
||
- if (__l > __b / sizeof(gid_t)) | ||
+ if (__l < 0 || (size_t)__l > __b / sizeof(gid_t)) | ||
__builtin_trap(); | ||
return __orig_getgroups(__l, __s); | ||
} | ||
-- | ||
2.1.4 | ||
|