summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Phillip Brink <binki@gentoo.org>2011-10-30 04:58:01 +0000
committerNathan Phillip Brink <binki@gentoo.org>2011-10-30 04:58:01 +0000
commit1e4e64950dcacef3875b1c716b285e6de9917947 (patch)
tree244daee9b3be8e7ae77516a91cc5fbfca09a8c9d /sys-power/cpufreqd/files
parentVersion bump. (diff)
downloadhistorical-1e4e64950dcacef3875b1c716b285e6de9917947.tar.gz
historical-1e4e64950dcacef3875b1c716b285e6de9917947.tar.bz2
historical-1e4e64950dcacef3875b1c716b285e6de9917947.zip
Add patch from bug #318287 by Sven Eden <yamakuzure@gmx.net> fixing glibc abort() for potential buffer overflow on startup when compiled with gcc-4.5 and CFLAGS="-O1" and passed the -f flag. OKed by steev_.
Package-Manager: portage-2.2.0_alpha71-r1/cvs/Linux x86_64
Diffstat (limited to 'sys-power/cpufreqd/files')
-rw-r--r--sys-power/cpufreqd/files/cpufreqd-2.4.2-PATH_MAX.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys-power/cpufreqd/files/cpufreqd-2.4.2-PATH_MAX.patch b/sys-power/cpufreqd/files/cpufreqd-2.4.2-PATH_MAX.patch
new file mode 100644
index 000000000000..c628f43401ea
--- /dev/null
+++ b/sys-power/cpufreqd/files/cpufreqd-2.4.2-PATH_MAX.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/318287: Fix buffer bound checks causing an
+abort when -f commandline parameter is passed.
+
+--- a/src/cpufreqd.h
++++ b/src/cpufreqd.h
+@@ -54,6 +54,12 @@
+ #define DEFAULT_VERBOSITY 3
+
+ #define MAX_STRING_LEN 255
+-#define MAX_PATH_LEN 512
++
++#ifdef HAVE_LIMITS_H
++#include <limits.h>
++#define MAX_PATH_LEN PATH_MAX
++#else
++#define MAX_PATH_LEN 512
++#endif
+
+ #endif /* __CPUFREQD_H__ */