From nobody Mon Mar 13 17:59:43 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pb4Dc26JDz3y1Qt; Mon, 13 Mar 2023 17:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pb4Dc1gnGz4RpM; Mon, 13 Mar 2023 17:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678730384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b4Nq+ZHtmlpALzzMhUCFJrLdXvxPYuVNDCFNrCtXetw=; b=D0M9y+sKjwY/BuPsKShU8EWqHIbu45QdA9uwAIDkHG4+6DASNFpJ8edljVtJmaYw6O2lHh WYFYPsRjpq5bl/r4JQWPc+cTbzegDMTTLaAVr0IYckaDoGkWu9ofPFNYC97tA174tB8fHG b9xuAfz62hb3bU73AR9hPWJEt8cYn9/Na2iBXE8qW2U1vILp+ACV1Qm0P2jWj8TQofrQYz KetWBMcGgDBMR5PzxnSqFAoQNkTb2ZejWLP/iEOI7UV/lIaTyNXBWRNU8LTiC0QcWNCH4u h2zzb1oQC7IX8+g4zt/13TRGx1SeVMAYyy/4aXOqwuT9vJbT5MumZ813NS4S5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678730384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b4Nq+ZHtmlpALzzMhUCFJrLdXvxPYuVNDCFNrCtXetw=; b=mRLFKZkQ9AzRHGUCWwYc3XkCHKCbHEZlCMt+Pd2otWVQ8v9FI+vzCdZWeTtTWsbcQ1ghX0 oHIVDg8Puz0Qn2/G4wqrz80jE3i+Hpnwzh9qfEuNmJII+K8cVbPoaG2jOyWeYTRI8OqaRV W3wflsNWHew7U63lbUoekJgb8XZFPNdmytDDgSJbvzlktM7FAULjptgIkHqJ9Yb0KirHWu AZw4xDsaTsC0zUpDepsrXTCDcqGjtzVbhCWNYjeDZW6B0DoKTaHLudOsge75Q41Shgh2yq JIiJvPbnIexnvuEur2CY1oNX3N956/IAFzBpTQAtAGbx+/Z+uB20k17paZJm4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678730384; a=rsa-sha256; cv=none; b=pSfjh5dBIAegvY/WIvj6CfqnYw9rEjfV6NPMh+uTXZzVXxmgH5SsV4pL7KpUGLafkR270R WpkfZAXwfS3vb7dQEdwusN1rC5bJ06QZFkrmbHkkk3sIGgy1yovWvamwnUejZj36Ciz3xx KoqiWk9J4tbZIxs7+2GWo/N8NZywsx5Ewg791GNFdG7651p0d+3YujzgXxmLfMqkxVXXVK EXCXHZkLMYUgw7MCoRuLHvVciha9OwSrSoVP5fHZuuC19vydKIB/07MBCJbn2eqGLOuhc8 ywto2NIglBwg1NsW/YuCYvt0EBDwR78kHJYZGbmcgtVHFGl9UqFVzBs0J04yKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Pb4Dc0bQLz12tt; Mon, 13 Mar 2023 17:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32DHxh3u038800; Mon, 13 Mar 2023 17:59:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32DHxhtK038799; Mon, 13 Mar 2023 17:59:43 GMT (envelope-from git) Date: Mon, 13 Mar 2023 17:59:43 GMT Message-Id: <202303131759.32DHxhtK038799@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jochen Neumeister Subject: git: 51cbef51eb08 - main - net-mgmt/monitoring-plugins: fix a check_http problem List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: joneum X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 51cbef51eb08e824165da843a97c388b97cb5522 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by joneum: URL: https://cgit.FreeBSD.org/ports/commit/?id=51cbef51eb08e824165da843a97c388b97cb5522 commit 51cbef51eb08e824165da843a97c388b97cb5522 Author: James TD Smith AuthorDate: 2023-03-13 17:57:33 +0000 Commit: Jochen Neumeister CommitDate: 2023-03-13 17:59:23 +0000 net-mgmt/monitoring-plugins: fix a check_http problem Updated monitoring-plugins to 2.3.3 and noticed check_http was segfaulting on some checks. Issue was already reported upstream and fixed: https://github.com/monitoring-plugins/monitoring-plugins/pull/1840 PR: 269747 Sponsored by: Netzkommune GmbH --- net-mgmt/monitoring-plugins/Makefile | 1 + .../files/patch-plugins_check__http.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/net-mgmt/monitoring-plugins/Makefile b/net-mgmt/monitoring-plugins/Makefile index 1baf7fda4d0c..aacf9dfddfa7 100644 --- a/net-mgmt/monitoring-plugins/Makefile +++ b/net-mgmt/monitoring-plugins/Makefile @@ -1,5 +1,6 @@ PORTNAME= monitoring-plugins PORTVERSION= 2.3.3 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= https://www.monitoring-plugins.org/download/ \ LOCAL/mat/${PORTNAME} diff --git a/net-mgmt/monitoring-plugins/files/patch-plugins_check__http.c b/net-mgmt/monitoring-plugins/files/patch-plugins_check__http.c new file mode 100644 index 000000000000..ce072578398b --- /dev/null +++ b/net-mgmt/monitoring-plugins/files/patch-plugins_check__http.c @@ -0,0 +1,17 @@ +diff --git a/plugins/check_http.c b/plugins/check_http.c +--- plugins/check_http.c.old ++++ plugins/check_http.c +@@ -1462,7 +1462,13 @@ char *unchunk_content(const char *content) { + memcpy(result + (overall_size - size_of_chunk), start_of_chunk, size_of_chunk); + } + +- result[overall_size] = '\0'; ++ if (overall_size == 0 && result == NULL) { ++ // We might just have received the end chunk without previous content, so result is never allocated ++ result = calloc(1, sizeof(char)); ++ // No error handling here, we can only return NULL anyway ++ } else { ++ result[overall_size] = '\0'; ++ } + return result; + }