From nobody Sun Nov 06 14:19:26 2022 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 4N4xM25xlYz4hHmj; Sun, 6 Nov 2022 14:19:26 +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 4N4xM25Xx2z3MXl; Sun, 6 Nov 2022 14:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667744366; 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=Tjce0SPgi+Wbyx3Nxxa/wWrpGkVtXngMtz9NO84+YIo=; b=TcNqPiyADk2dVyVNci7SuaQgyf1XeOJyCr9k/XEh6zXTqGTjLzekGyAXJx504KG+02vK2l E6M78f7gbuWSHPOLYPR3yfCNKNSSMHQoBm9jXdHYHxTshjCgho4Jb1TqKdoUOI2SJfXTO4 qkb7W713tfeQ1kUxjHBBIywRL6662vNYfXpvm6nzUxAOye17rILhb6NAdTNfH0J4MKlewK ROmIhdv1wSCl2XMpToVo3kElGzE8VV+tHg6WpI/VcQlUQebaJA4b9aMS7Xxfwa2rSZUCiI CvZTLBogydtdKBQN3I+4i/nNTp/H7gB9lqIoVHmvpYwR2OerBK110aaLJhPscw== 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 4N4xM24cf4zPPP; Sun, 6 Nov 2022 14:19:26 +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 2A6EJQIq069113; Sun, 6 Nov 2022 14:19:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A6EJQ48069112; Sun, 6 Nov 2022 14:19:26 GMT (envelope-from git) Date: Sun, 6 Nov 2022 14:19:26 GMT Message-Id: <202211061419.2A6EJQ48069112@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: 4718d86b3b1a - stable/13 - ssh: correct parse_cert_times case for hex "to" time 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4718d86b3b1aac3f58c19fce34932fd88486af94 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667744366; 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=Tjce0SPgi+Wbyx3Nxxa/wWrpGkVtXngMtz9NO84+YIo=; b=UILVF0E4FfGP39vwP1xadKpfmzax8Xzh+7W1EtT0/MvcpAMyJAfrdA7hzbzEuiVcM2zUpo L3kEdx3pt2PXgodrNsvoHBJpIxee6qX2pZ+xE8Fy3RrsEcfiwBj/b2XeVsgTqDbGlS9nGD SKYviQgHRFjBqhLd2rrkzbyfrZP5fFUoy/rN/l/Q31SOPm+maw8l3KzOCempzDjWt+grj9 IRtbwqoIufLbFgnPR4pJ5GSfD/uke+WF4CN+NnaP5jH8fTS6v065jYLE7WJlRhDXr+3do1 QTx/xr4i0Ak/89XKdwQ9ijmRzGvMGI3jLSmhG/99cQPNmGibZo1O/8dUs7DViQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667744366; a=rsa-sha256; cv=none; b=qNp3binBzHmnXsJL2kPp+rSm3mkCO2Hjif8FoEntvs1tEc1nCTp67M8M/gBf9viaIrmwb8 03TK2V6jbfDEMnAMQzeg2LsewCmb6TiLLlB778wW5noMlz8iBbhxG3wBJJM0MFTHRH6yGM C6haMKQDNYutzZ1CbIVNC7E3UeOkU84pjS6kP239VY9MpVDc8oRMVeySjbTROcvLS7DPgQ hwU0a3wue6mOmjqMJXqz9u8d64kpJL+my+fG2N0lGphgL29aurHFf+SHCsrODTvyEJ8C3I JI8Xt9E/w/efl89mAOnGW7Idmix5CfseXYv4aRqIHpQQauupMpEZ+4zwEM5l/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4718d86b3b1aac3f58c19fce34932fd88486af94 commit 4718d86b3b1aac3f58c19fce34932fd88486af94 Author: Ed Maste AuthorDate: 2022-11-03 13:44:52 +0000 Commit: Ed Maste CommitDate: 2022-11-06 14:19:02 +0000 ssh: correct parse_cert_times case for hex "to" time This appeared to be a copy-paste error from the "from" time case above. Reported by: Coverity Scan CID: 1500407 Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37252 (cherry picked from commit 0657b2325df3d85967870a928d58b24ffcf3f1ea) --- crypto/openssh/ssh-keygen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssh/ssh-keygen.c b/crypto/openssh/ssh-keygen.c index 9b2beda05f0c..1255957d0e67 100644 --- a/crypto/openssh/ssh-keygen.c +++ b/crypto/openssh/ssh-keygen.c @@ -1975,7 +1975,7 @@ parse_cert_times(char *timespec) cert_valid_to = parse_relative_time(to, now); else if (strcmp(to, "forever") == 0) cert_valid_to = ~(u_int64_t)0; - else if (strncmp(from, "0x", 2) == 0) + else if (strncmp(to, "0x", 2) == 0) parse_hex_u64(to, &cert_valid_to); else if (parse_absolute_time(to, &cert_valid_to) != 0) fatal("Invalid to time \"%s\"", to);