From nobody Sat May 06 00:29:44 2023 X-Original-To: dev-commits-src-branches@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 4QCpN82LQmz4B0b0; Sat, 6 May 2023 00:29: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 4QCpN81jJQz41b2; Sat, 6 May 2023 00:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332984; 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=a6wPuDNeCFfa/MyIfdT0J3UOznsme0F129zJQO04yAk=; b=KJpPum1kGgTtQyJrCz/El+pkFqB1y9nBGTOfrh33X6ribt2Ix4NQJRglIEZbBxF/24D02r tEtYjI4P1XwqQumuuL6EWHVy3X7ODJ2eURFq/+WFxsH173uvYuPUXR4qMec3hlFhR+j54x w22BhIhAhiJu3jgwrB8EENHw0m8cAjsGacGuEb6LrYzB94IJglU/T2U2XsA9fNCkmJpZ+U I5BGAUOeyki2eABkhyM4k/b6VVRSeMAMc2+xefjxl5KLfkDLuk7mWHlSYwTpn9saAesX87 h/lKJeMBsKUZruIEuQGTFFf44bJKE619wfgAix1SqCZuiD2Hg+hwtp2LkTV3LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332984; 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=a6wPuDNeCFfa/MyIfdT0J3UOznsme0F129zJQO04yAk=; b=dzTo3hH8kKBWhjfqDENOPfOPx/4PNuvoV6OH57ZQyTxSro2U0fJVaOtefb29dvH9lEzAnW zuzA2kOZ/KGSe+wwziQsCdRmGhGv9kz6ikw1m5GDUazkEKwHQ57VFwo80o9iZJIzMBUF4V PWGa0GSsTbobDCZtKEBnhqCugCdeAnwLgXWO1Av8lRZe4WPg9Hw1KAsTjHS5kwl4DEMcaE lRu4BaoHJXcTcBO4xm+jwgw+Tfj7cZLIs8akHK86arKqNIyyhcCPkBlLkeoWifctuGYn3X G7PWURZvOw7e1aFUZndUaiTB96PMB/wjCKesmI93oTuGzOtR5zc+SU95NctNVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683332984; a=rsa-sha256; cv=none; b=eOytDX7NdBfp7e1aRAOg+3UZDQX1ppgtRw/FowrCSUODfu3mzXunIPoHR7AHE5aBqILzLu wisAGjjSo7fLXrEpG4Di5O13nD0WHSFiOGOWOhRRRGUxSTMeg+Gq5RUb8Ynah+Mh3hd/gp q+Ami2fXLB6hFnbkf7y94bQlYN7rzw52vfQ5T3qkBBUFmibEmVoFb5+1MxgGetozCSs/xu B8I/0Z/GyRNPGuG9ZnAt0NtM5+esLAI1Vkdf0tQdrlQ/z0VIaIOCDMV8Z+to/RXeW9/4f2 C8fDeheCn5IUkWSc2d5hMIKdIns4zRez+ti1lxVwjMZQset1QQEYiBP+ArJ/Yw== 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 4QCpN80nvBzGJp; Sat, 6 May 2023 00:29: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 3460Ti1K004364; Sat, 6 May 2023 00:29:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3460TiH2004363; Sat, 6 May 2023 00:29:44 GMT (envelope-from git) Date: Sat, 6 May 2023 00:29:44 GMT Message-Id: <202305060029.3460TiH2004363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c6062b358862 - stable/13 - authpf: do not sprintf to a null pointer List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c6062b3588624371feb24a52c34c8d0674f59f80 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c6062b3588624371feb24a52c34c8d0674f59f80 commit c6062b3588624371feb24a52c34c8d0674f59f80 Author: Ed Maste AuthorDate: 2023-05-03 13:26:42 +0000 Commit: Ed Maste CommitDate: 2023-05-06 00:29:31 +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 (cherry picked from commit 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07) --- 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);