Blame apachetop-0.12.6-maxpathlen.patch
|
|
be81690 |
Patch by Robert Scheck <robert@fedoraproject.org> for apachetop <= 0.12.6, which
|
|
|
be81690 |
adds some includes in order to have a real change to get MAXPATHLEN defined with
|
|
|
be81690 |
a valid value. Once MAXPATHLEN really gets filled with 128, it will just cause a
|
|
|
be81690 |
buffer overflow.
|
|
|
be81690 |
|
|
|
be81690 |
See Red Hat Bugzilla #446199 (https://bugzilla.redhat.com/show_bug.cgi?id=446199)
|
|
|
be81690 |
for more information. This patch should solve the mentioned bug report and should
|
|
|
be81690 |
be sane enough to get included by upstream of apachetop for the next release. It
|
|
|
be81690 |
is important to run autoheader before ./configure to get these changes activated.
|
|
|
be81690 |
|
|
|
be81690 |
--- apachetop-0.12.6/configure.ac 2005-10-27 18:39:25.000000000 +0200
|
|
|
be81690 |
+++ apachetop-0.12.6/configure.ac.maxpathlen 2008-06-21 16:00:38.000000000 +0200
|
|
|
be81690 |
@@ -34,7 +34,8 @@
|
|
|
be81690 |
# Checks for header files.
|
|
|
be81690 |
AC_HEADER_STDC
|
|
|
be81690 |
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h \
|
|
|
be81690 |
- string.h strings.h sys/socket.h time.h sys/time.h])
|
|
|
be81690 |
+ string.h strings.h sys/socket.h time.h sys/time.h \
|
|
|
be81690 |
+ limits.h sys/param.h])
|
|
|
be81690 |
|
|
|
be81690 |
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
be81690 |
#AC_HEADER_STDBOOL # not in 2.53?
|
|
|
be81690 |
--- apachetop-0.12.6/src/apachetop.h 2005-10-15 18:10:01.000000000 +0200
|
|
|
be81690 |
+++ apachetop-0.12.6/src/apachetop.h.maxpatlen 2008-06-21 16:02:00.000000000 +0200
|
|
|
be81690 |
@@ -89,8 +89,12 @@
|
|
|
be81690 |
#define getMIN(a,b) (a < b ? a : b)
|
|
|
be81690 |
#define getMAX(a,b) (a > b ? a : b)
|
|
|
be81690 |
|
|
|
be81690 |
-#ifndef MAXPATHLEN
|
|
|
be81690 |
-# define MAXPATHLEN 128
|
|
|
be81690 |
+#ifdef HAVE_SYS_PARAM_H
|
|
|
be81690 |
+# include <sys/param.h>
|
|
|
be81690 |
+#endif
|
|
|
be81690 |
+
|
|
|
be81690 |
+#if HAVE_LIMITS_H
|
|
|
be81690 |
+# include <limits.h>
|
|
|
be81690 |
#endif
|
|
|
be81690 |
|
|
|
be81690 |
/* upon startup, each input file is put into an element of this array,
|