$NetBSD: patch-eh,v 1.1 2006/10/01 20:08:29 seb Exp $

--- agent/mibgroup/ucd-snmp/pass_persist.c.orig	2005-10-03 11:52:44.000000000 +0000
+++ agent/mibgroup/ucd-snmp/pass_persist.c
@@ -89,6 +89,7 @@ pass_persist_parse_config(const char *to
 {
     struct extensible **ppass = &persistpassthrus, **etmp, *ptmp;
     char           *tcptr, *endopt;
+    long	    priorl;
     int             i, priority;
 
     /*
@@ -106,10 +107,12 @@ pass_persist_parse_config(const char *to
 	  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);
