From nobody Wed May 03 14:03:44 2023 X-Original-To: dev-commits-src-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 4QBJZn0B1zz49NHf; Wed, 3 May 2023 14:03:45 +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 4QBJZm6hdwz3xF1; Wed, 3 May 2023 14:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683122624; 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=kd+dpIqXbyltQVLoS+vhhzpKUk28EAsLuowcTL2NkjI=; b=VoOj+d/V8ho26dv++Bj/qbijv0OSfWUSFD9Mk7KpQGuznpOEGIwV3xP2/7Z8184vALljfJ 0HRt4+dPqizwJu3YG/WjNG9aFeSEmt/cI2IOup7WMToUAv/WBaExTBkl8aD3lp5jawPIIA y2/MvjdQ7ztUC4T1DhYYzQXEoDzieYTWss1w+KGMCuzbG5f7xw7I8YLsWjGxlcCpk1IZEf gld+F5+q7YO/WaYR8f99pXJhE5aBnX0KRnqSNCeTTsMJZB4v90o6s0TZ43H2e3H/TqVsG6 yeGw37w6unI0F4iR8nYfenoSkc73t7YpPqNctlNUO1hHhX0GjbQpKg2avKpXeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683122624; 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=kd+dpIqXbyltQVLoS+vhhzpKUk28EAsLuowcTL2NkjI=; b=oJ2rVPODjz/WxE6DwqRhvk5aHz8nZw0usp7JT0sS98mewn3JV2OKOaxfI1DxmfRqoD40VK ouJ0hjAATId7QewYl8bB+h8Si9aLqhp7ef3gs2OCNYio2MAH/3Mvt72tcE+WAfQBuxJqDd Q807BzvNe4htJ8qVe+/AcaN9Yd3aneJRGxtOwX9l/hQMbBTH2J+LR2gzni1tts3cEvivu7 u+ggrEmSUS0LyXMNK+DzNtlKHVZROCtFarKrf4s8hK0v+EXosmIehwUikLPBgfZgjNThg4 FhpoYYinHon3Q/acCWURH1HGw7PC+stKZDx7cMru3Hcm402hNi+JiueTl6S4Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683122624; a=rsa-sha256; cv=none; b=aCGcR06PGTR5jhaVePo5tNQpTsOF7Jn+hp2drqN+F9xNnT9mNLXTcEIGkCQoM8H2tEfj3w 4VW1ghPWXxpEax83qFgIQD2Xn1mczp5mEwSyh0d4RGD6eeSNxh3XwpU0sodh5w4QNbqpQL Qh9KO5N7cHLdJIeqBk1IlpeFpwtlapUU271WbxyNb9gZWAdpOj2LxFq3oCFWlfsZSFC4uj +GCz41lNlPV8YWEON1TDcpYLNVKnUPP4TmRQqm7rDs3TW8are1n3ADfjbJaGDM2ClDp2QX S0k05qHGWQgRWVbaOqInQqBn5+kS7oY47BB5OFj6lpR0bRxlnPjWKuRORW1kuQ== 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 4QBJZm5mcFzXvL; Wed, 3 May 2023 14:03: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 343E3ih8026297; Wed, 3 May 2023 14:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343E3iNN026296; Wed, 3 May 2023 14:03:44 GMT (envelope-from git) Date: Wed, 3 May 2023 14:03:44 GMT Message-Id: <202305031403.343E3iNN026296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 81f964e2ffb7 - main - authpf: do not sprintf to a null pointer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 commit 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 Author: Ed Maste AuthorDate: 2023-05-03 13:26:42 +0000 Commit: Ed Maste CommitDate: 2023-05-03 14:03:27 +0000 authpf: do not sprintf to a null pointer The fgetln loop will terminate with buf = NULL at EOF. Reported by: GCC Reviewed by: kp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39947 --- contrib/pf/authpf/authpf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 4032efb27895..5ffa5b9cfe43 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -566,9 +566,8 @@ allowed_luser(struct passwd *pw) syslog(LOG_INFO, "denied access to %s: not listed in %s", pw->pw_name, PATH_ALLOWFILE); - /* reuse buf */ - sprintf(buf, "%s", "\n\nSorry, you are not allowed to use this facility!\n"); - fputs(buf, stdout); + fputs("\n\nSorry, you are not allowed to use this facility!\n", + stdout); } fflush(stdout); return (0);