From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 21 16:00:10 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 673FA16A41B for ; Sat, 21 Jul 2007 16:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 455BE13C457 for ; Sat, 21 Jul 2007 16:00:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l6LG09wb080335 for ; Sat, 21 Jul 2007 16:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6LG09xA080334; Sat, 21 Jul 2007 16:00:09 GMT (envelope-from gnats) Resent-Date: Sat, 21 Jul 2007 16:00:09 GMT Resent-Message-Id: <200707211600.l6LG09xA080334@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Matuska Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A15A816A418 for ; Sat, 21 Jul 2007 15:51:59 +0000 (UTC) (envelope-from rebum@mail.vx.sk) Received: from mail.vx.sk (neo.vx.sk [88.198.35.14]) by mx1.freebsd.org (Postfix) with ESMTP id 690C613C47E for ; Sat, 21 Jul 2007 15:51:59 +0000 (UTC) (envelope-from rebum@mail.vx.sk) Received: from localhost (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 027D84351B; Sat, 21 Jul 2007 17:51:57 +0200 (CEST) Received: from mail.vx.sk ([127.0.0.1]) by localhost (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NDOgWriz+dJY; Sat, 21 Jul 2007 17:51:55 +0200 (CEST) Received: by mail.vx.sk (Postfix, from userid 1001) id 879CD4351A; Sat, 21 Jul 2007 17:51:55 +0200 (CEST) Message-Id: <20070721155155.879CD4351A@mail.vx.sk> Date: Sat, 21 Jul 2007 17:51:55 +0200 (CEST) From: Martin Matuska To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Petr Lampa Subject: ports/114793: [PATCH] net-mgmt/nagios-plugins X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Martin Matuska List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2007 16:00:10 -0000 >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 : 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: