From nobody Mon Oct 09 07:41:58 2023 X-Original-To: dev-commits-ports-main@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 4S3rZw081Vz4wtMk; Mon, 9 Oct 2023 07:42:00 +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 4S3rZv37C6z3HsF; Mon, 9 Oct 2023 07:41:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696837319; 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=/VuInEdrHmPuAor6d4EO1GbnK8Tjf9PbzIvEZ4Rz5QM=; b=LSppkDpFIkH91T4Z1hHuzuAeS5A6zqBNdU0SIGILC8JO1F6RwbW5fSb4rGDcFFRpIEsvdn HAjVEYSdULpXDOJkAJMrrfbvAFwxlE5sNe6CEmVWjcRJAI9SaV+cnu8oay6w6V66wR6XX8 hMzerPJcjPODAhdnB7chn2yozUZU3SDD1iLAT3B7HRilEMTOBtKDO4X8MsOW6CCl7qjA/H 1etVxTfc+PAjGVnxhC0C0YijbUBDAFYiuosZRAOgUma0cVaofintLGF9Vruukp+wyV+eYq c3pdVEF5behfV609X/M8Es6tF3ndlsmifFrb+/g+V4m3yGrfjYs/4q03rJu5Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696837319; a=rsa-sha256; cv=none; b=psSfevFBMt7hVPwacZHztQEMkE7o+CgDkKMZD6tHVY54e1E+NM12NMw/U9keiAFOy3wKW2 DSxKQEJK09ijqOAAjapQQeFHigTGD+iBf25VCfiI1YzkS4sxZEBzbynf4jlJhFadOfI4Y4 F1QbNaxGPCk1LVnTuoWybE32j+FMp+5jdkkTN8FE1WTDJ6K3106HKrRcGetNHwCg2vhoby j5iIQn9N83sVSxQh3SAt2bCdauvkZDao+1TdYwbSgjvj1qqn1VgGke9JDiEjNghzqVUeDI dWIWQUgceeS5+T8IhCfEXgh1eMK0rk5izTR+rHGA06tkJOMiBNRfB121yD+58g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696837319; 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=/VuInEdrHmPuAor6d4EO1GbnK8Tjf9PbzIvEZ4Rz5QM=; b=vOaw/qiIY7QsGi0IB7NC0mauTXPoJOpo/q/eX84kaUQMs2ApW1bH2PdooW/fxDQdbmmJ1E w2XN3K9N41qWTPNdJYpYYXmUe2TJsbkNJJj7Qagc+vFaCTLaLSAC9BQsbIzhh0ByGtvwBN 9I6lcQIKd9fpjy45B+qMvg2d+IniqGatHwTqVKcaR4jAkV6/nV9aYrLvcBlLc14sddQDWy zLZJ5Dven7ixV99NFtHxmT/9nwWMQL+ryM06SHEB1qBDQwuF6LyIQFYIDW2QJ9x7zaeZxK 24E+Hj2BkvMuiV3ebOARonGbqHLdSs3eufbhJOVepkIGXEpxFE3Uk2pQFBITZA== 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 4S3rZt5wKQzn8S; Mon, 9 Oct 2023 07:41:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3997fwV2021395; Mon, 9 Oct 2023 07:41:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3997fwwG021392; Mon, 9 Oct 2023 07:41:58 GMT (envelope-from git) Date: Mon, 9 Oct 2023 07:41:58 GMT Message-Id: <202310090741.3997fwwG021392@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: ffaf1c4515dd - main - net/pload: fix crash at startup List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffaf1c4515dd11fc28fd00c97ae5c8ff78aca4e1 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=ffaf1c4515dd11fc28fd00c97ae5c8ff78aca4e1 commit ffaf1c4515dd11fc28fd00c97ae5c8ff78aca4e1 Author: J.R. Oldroyd AuthorDate: 2023-10-08 17:59:09 +0000 Commit: Robert Clausecker CommitDate: 2023-10-09 07:40:32 +0000 net/pload: fix crash at startup Looks like there was no NULL pointer at the end of the orig_argv[] when it was copied or restored. PR: 274354 Reported by: Rupert Stitzinger MFH: 2023Q4 --- net/pload/Makefile | 4 ++-- net/pload/files/patch-pload.c | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/net/pload/Makefile b/net/pload/Makefile index 6aab9b94341c..a66efd39f478 100644 --- a/net/pload/Makefile +++ b/net/pload/Makefile @@ -1,6 +1,6 @@ PORTNAME= pload -PORTVERSION= 0.9.5 -PORTREVISION= 5 +DISTVERSION= 0.9.5 +PORTREVISION= 6 CATEGORIES= net sysutils MASTER_SITES= http://opal.com/src/pload/ LOCAL/pav diff --git a/net/pload/files/patch-pload.c b/net/pload/files/patch-pload.c index 9c6c17263337..6a03d7295163 100644 --- a/net/pload/files/patch-pload.c +++ b/net/pload/files/patch-pload.c @@ -1,6 +1,6 @@ --- pload.c.orig 2000-02-01 07:11:24 UTC +++ pload.c -@@ -285,6 +285,13 @@ static XtResource pload_resources[] = { +@@ -285,6 +285,14 @@ static XtResource pload_resources[] = { /************* Main () ******************/ int main (int argc, char *argv[]) { @@ -10,11 +10,12 @@ + /* save original argv pointers */ + for(i = 0; argv[i]; i++) + orig_argv[i] = argv[i]; ++ orig_argv[i] = NULL; /* add trailing NULL pointer */ + Progname = argv[0]; toplevel = XtAppInitialize ( -@@ -301,6 +308,11 @@ int main (int argc, char *argv[]) +@@ -301,6 +309,12 @@ int main (int argc, char *argv[]) and exit */ if (argc != 1) Usage(); @@ -22,11 +23,12 @@ + argv so that ps(1) shows the command line */ + for(i = 0; orig_argv[i]; i++) + argv[i] = orig_argv[i]; ++ argv[i] = orig_argv[i]; /* copy trailing NULL pointer */ + XtGetApplicationResources( toplevel, /* widget */ (XtPointer) &resources, /* where to put */ -@@ -596,27 +608,26 @@ void CheckForWMExit( Widget w, +@@ -596,27 +610,26 @@ void CheckForWMExit( Widget w, void do_total(char *b, double total) { if (total < 1024.0) @@ -62,7 +64,7 @@ return; } -@@ -643,6 +654,9 @@ void make_label(char *fmt, unsigned long total, double +@@ -643,6 +656,9 @@ void make_label(char *fmt, unsigned long total, double break; case 'M': do_rate(buff, max);