Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e61c77c1f691c325b4ef53ee320f4763 > files > 6

net-snmp-5.5-20.fc14.src.rpm

616347  - snmptrapd dies when starting external script

Source: upstream, SVN rev. 19231

Index: net-snmp/snmplib/system.c
===================================================================
--- net-snmp/snmplib/system.c	(revision 19230)
+++ net-snmp/snmplib/system.c	(revision 19231)
@@ -158,6 +158,10 @@
 #include <grp.h>
 #endif
 
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
 #include <net-snmp/types.h>
 #include <net-snmp/output_api.h>
 #include <net-snmp/utilities.h>
@@ -1027,7 +1031,11 @@
 const char     *
 netsnmp_mktemp(void)
 {
-    static char     name[32];
+#ifdef PATH_MAX
+    static char     name[PATH_MAX];
+#else
+    static char     name[256];
+#endif
     int             fd = -1;
 
     strcpy(name, get_temp_file_pattern());