net-snmp/net-snmp-5.5-mktemp-size.patch

33 lines
754 B
Diff
Raw Normal View History

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());