Date: Sat, 21 Jul 2007 17:51:55 +0200 (CEST) From: Martin Matuska <mm@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Petr Lampa <lampa@fit.vutbr.cz> Subject: ports/114793: [PATCH] net-mgmt/nagios-plugins Message-ID: <20070721155155.879CD4351A@mail.vx.sk> Resent-Message-ID: <200707211600.l6LG09xA080334@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070721155155.879CD4351A>