diff -Nru cpufreqd-2.4.2/debian/changelog cpufreqd-2.4.2/debian/changelog --- cpufreqd-2.4.2/debian/changelog 2013-03-23 12:51:28.000000000 +0000 +++ cpufreqd-2.4.2/debian/changelog 2014-01-04 10:52:04.000000000 +0000 @@ -1,3 +1,9 @@ +cpufreqd (2.4.2-2ubuntu1) trusty; urgency=medium + + * path_max.patch: Pull upstream patch to fix MAX_PATH_LEN (LP: #1162160) + + -- Adam Conrad Sat, 04 Jan 2014 03:51:23 -0700 + cpufreqd (2.4.2-2) unstable; urgency=low * Fix reading the correct battery attribute diff -Nru cpufreqd-2.4.2/debian/control cpufreqd-2.4.2/debian/control --- cpufreqd-2.4.2/debian/control 2013-03-23 12:51:28.000000000 +0000 +++ cpufreqd-2.4.2/debian/control 2014-01-04 10:52:14.000000000 +0000 @@ -1,7 +1,8 @@ Source: cpufreqd Section: admin Priority: optional -Maintainer: Mattia Dongili +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Mattia Dongili Build-Depends: debhelper (>= 7), quilt, automake, libtool, libsensors4-dev, libcpufreq-dev, libsysfs-dev (>= 2.0.0) Standards-Version: 3.8.4 Homepage: http://sourceforge.net/projects/cpufreqd diff -Nru cpufreqd-2.4.2/debian/patches/path_max.patch cpufreqd-2.4.2/debian/patches/path_max.patch --- cpufreqd-2.4.2/debian/patches/path_max.patch 1970-01-01 00:00:00.000000000 +0000 +++ cpufreqd-2.4.2/debian/patches/path_max.patch 2014-01-04 10:50:29.000000000 +0000 @@ -0,0 +1,35 @@ +From b5b23525edcc09898288360c48e92b4a6c9cb0ee Mon Sep 17 00:00:00 2001 +From: Perttu Luukko +Date: Sun, 13 Jun 2010 15:20:10 +0900 +Subject: [PATCH] Fix cpufreqd segfault when calling realpath + +The size is set at cpufreqd.h to 512. man 3 realpath tells me that +realpath wants a buffer of size PATH_MAX, so I modified cpufreqd.h to +include limits.h if it is present and use PATH_MAX. + +Signed-off-by: Mattia Dongili +--- + src/cpufreqd.h | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/src/cpufreqd.h b/src/cpufreqd.h +index 9733a5f..97b905a 100644 +--- 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 ++#define MAX_PATH_LEN PATH_MAX ++#else ++#define MAX_PATH_LEN 512 ++#endif + + #endif /* __CPUFREQD_H__ */ +-- +1.7.2.5 + diff -Nru cpufreqd-2.4.2/debian/patches/series cpufreqd-2.4.2/debian/patches/series --- cpufreqd-2.4.2/debian/patches/series 2013-03-23 12:51:28.000000000 +0000 +++ cpufreqd-2.4.2/debian/patches/series 2014-01-04 10:51:17.000000000 +0000 @@ -1 +1,2 @@ 619913.patch +path_max.patch