From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../250217-nagiosplugins-checksnmp-crash.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 web/attachments/250217-nagiosplugins-checksnmp-crash.patch (limited to 'web/attachments/250217-nagiosplugins-checksnmp-crash.patch') diff --git a/web/attachments/250217-nagiosplugins-checksnmp-crash.patch b/web/attachments/250217-nagiosplugins-checksnmp-crash.patch new file mode 100644 index 0000000..6fc9540 --- /dev/null +++ b/web/attachments/250217-nagiosplugins-checksnmp-crash.patch @@ -0,0 +1,37 @@ +--- 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) */ + -- cgit v1.2.3-74-g34f1