summaryrefslogtreecommitdiff
path: root/net/net-snmp/patches/patch-eg
diff options
context:
space:
mode:
Diffstat (limited to 'net/net-snmp/patches/patch-eg')
-rw-r--r--net/net-snmp/patches/patch-eg27
1 files changed, 27 insertions, 0 deletions
diff --git a/net/net-snmp/patches/patch-eg b/net/net-snmp/patches/patch-eg
new file mode 100644
index 00000000000..aead42a5c70
--- /dev/null
+++ b/net/net-snmp/patches/patch-eg
@@ -0,0 +1,27 @@
+$NetBSD: patch-eg,v 1.1 2006/10/01 20:08:29 seb Exp $
+
+--- agent/mibgroup/ucd-snmp/pass.c.orig 2005-08-18 00:44:02.000000000 +0000
++++ agent/mibgroup/ucd-snmp/pass.c
+@@ -163,6 +163,7 @@ pass_parse_config(const char *token, cha
+ {
+ struct extensible **ppass = &passthrus, **etmp, *ptmp;
+ char *tcptr, *endopt;
++ long priorl;
+ int i, priority;
+
+ /*
+@@ -180,10 +181,12 @@ pass_parse_config(const char *token, cha
+ config_perror("priority must be an integer");
+ return;
+ }
+- priority = strtol((const char*) cptr, &endopt, 0);
+- if ((priority == LONG_MIN) || (priority == LONG_MAX)) {
++ priorl = strtol((const char*) cptr, &endopt, 0);
++ if ((priorl <= INT_MIN) || (priorl >= INT_MAX)) {
+ config_perror("priority under/overflow");
+ return;
++ } else {
++ priority = (int)priorl;
+ }
+ cptr = endopt;
+ cptr = skip_white(cptr);