rpms/nagios-plugins/EL-5 nagiosplugins-checksnmp-crash.patch, NONE, 1.1 nagios-plugins.spec, 1.29, 1.30

Michael Patrick McGrath (mmcgrath) fedora-extras-commits at redhat.com
Fri Oct 26 14:25:00 UTC 2007


Author: mmcgrath

Update of /cvs/extras/rpms/nagios-plugins/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12905/EL-5

Modified Files:
	nagios-plugins.spec 
Added Files:
	nagiosplugins-checksnmp-crash.patch 
Log Message:
Forgot to add a patch

nagiosplugins-checksnmp-crash.patch:

--- NEW FILE nagiosplugins-checksnmp-crash.patch ---
--- plugins/check_snmp.c.old	2007-05-29 07:22:32.000000000 +0200
+++ plugins/check_snmp.c	2007-10-17 22:08:49.000000000 +0200
@@ -219,12 +219,16 @@ main (int argc, char **argv)
 
 	ptr = output;
 
-	strcat(perfstr, "| ");
+	strncat(perfstr, "| ", sizeof(perfstr)-strlen(perfstr)-1);
 	while (ptr) {
 		char *foo;
+		unsigned int copylen;
 
 		foo = strstr (ptr, delimiter);
-		strncat(perfstr, ptr, foo-ptr);
+		copylen = foo-ptr;
+		if (copylen > sizeof(perfstr)-strlen(perfstr)-1)
+			copylen = sizeof(perfstr)-strlen(perfstr)-1;
+		strncat(perfstr, ptr, copylen);
 		ptr = foo; 
 
 		if (ptr == NULL)
@@ -357,11 +361,11 @@ main (int argc, char **argv)
 
 		i++;
 
-		strcat(perfstr, "=");
-		strcat(perfstr, show);
+		strncat(perfstr, "=", sizeof(perfstr)-strlen(perfstr)-1);
+		strncat(perfstr, show, sizeof(perfstr)-strlen(perfstr)-1);
 		if (type)
-			strcat(perfstr, type);
-		strcat(perfstr, " ");
+			strncat(perfstr, type, sizeof(perfstr)-strlen(perfstr)-1);
+		strncat(perfstr, " ", sizeof(perfstr)-strlen(perfstr)-1);
 
 	}	/* end while (ptr) */
 


Index: nagios-plugins.spec
===================================================================
RCS file: /cvs/extras/rpms/nagios-plugins/EL-5/nagios-plugins.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- nagios-plugins.spec	26 Oct 2007 14:09:39 -0000	1.29
+++ nagios-plugins.spec	26 Oct 2007 14:24:25 -0000	1.30
@@ -1,6 +1,6 @@
 Name: nagios-plugins
 Version: 1.4.8
-Release: 8%{?dist}
+Release: 9%{?dist}
 Summary: Host/service/network monitoring program plugins for Nagios
 
 Group: Applications/System
@@ -789,7 +789,7 @@
 %{_libdir}/nagios/plugins/utils.sh
 
 %changelog
-* Fri Oct 26 2007 Mike McGrath <mmcgrath at redhat.com> 1.4.8-8
+* Fri Oct 26 2007 Mike McGrath <mmcgrath at redhat.com> 1.4.8-9
 - Fix for Bug 348731 and CVE-2007-5623
 
 * Wed Aug 22 2007 Mike McGrath <mmcgrath at redhat.com> 1.4.8-7




More information about the fedora-extras-commits mailing list