Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > beaac7f9c0434f6a9ea76defad0458a6 > files > 2

apachetop-0.12.6-7.mga5.src.rpm

Index: src/apachetop.cc
===================================================================
--- src/apachetop.cc
+++ src/apachetop.cc	2009-04-23 22:33:06.000000000 +0200
@@ -3,6 +3,7 @@
 **
 */
 #include "apachetop.h"
+#include <limits.h>
 
 /* die and report why */
 #define DIE(msg) fprintf(stderr, "%s: %s\n", msg, strerror(errno)); catchsig(1);
@@ -958,7 +959,7 @@
 	int i, fd, input_element = -1;
 	struct stat sb;
 	struct input *this_file;
-	char realfile[MAXPATHLEN];
+	char realfile[PATH_MAX];
 
 	/* if realpath cannot resolve the file, give up */
 	if ((realpath(filename, realfile) == NULL))