ports/114793: [PATCH] net-mgmt/nagios-plugins
Martin Matuska
mm at FreeBSD.org
Sat Jul 21 16:00:10 UTC 2007
>Number: 114793
>Category: ports
>Synopsis: [PATCH] net-mgmt/nagios-plugins
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jul 21 16:00:09 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Martin Matuska
>Release: FreeBSD 7-CURRENT
>Organization:
>Environment:
FreeBSD 7-CURRENT i386 amd64
>Description:
Private mail from Petr Lampa <lampa at fit.vutbr.cz>:
At line 92 nagions-1.4.9/lib/utils_base.c (checked in 1.4.9 and CVS):
temp_thresholds = malloc(sizeof(temp_thresholds));
shoud read:
temp_thresholds = malloc(sizeof(thresholds));
Manifested in FreeBSD 7.0, some plugins started core dumping (malloc(4) vs.
malloc(8)). Patch is attached (it was also sent to nagios).
Regards,
Petr lampa
Maintainer please verify and/or approve.
>How-To-Repeat:
>Fix:
Index: ports/net-mgmt/nagios-plugins/files/patch-lib-utils_base.c
===================================================================
RCS file: ports/net-mgmt/nagios-plugins/files/patch-lib-utils_base.c
diff -N ports/net-mgmt/nagios-plugins/files/patch-lib-utils_base.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ports/net-mgmt/nagios-plugins/files/patch-lib-utils_base.c 21 Jul 2007 15:44:35 -0000
@@ -0,0 +1,11 @@
+--- lib/utils_base.c.orig Sat Jul 21 17:42:49 2007
++++ lib/utils_base.c Sat Jul 21 17:43:07 2007
+@@ -89,7 +89,7 @@
+ {
+ thresholds *temp_thresholds = NULL;
+
+- temp_thresholds = malloc(sizeof(temp_thresholds));
++ temp_thresholds = malloc(sizeof(thresholds));
+
+ temp_thresholds->warning = NULL;
+ temp_thresholds->critical = NULL;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list