[openssh-commits] [openssh] 01/05: upstream: Move state sanity check to before potential use. CID
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Nov 2 18:32:29 AEDT 2026
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 511fcdc77de3006a05ccbcdbac2f15615a807c28
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Sat Oct 31 03:29:22 2026 +0000
upstream: Move state sanity check to before potential use. CID
915536, ok djm@
OpenBSD-Commit-ID: e10cd1caf73663ca194b2c7f793a785892feb127
---
packet.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/packet.c b/packet.c
index 82e891e1d..24e3ba4f0 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.349 2026/10/30 07:25:33 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.350 2026/10/31 03:29:22 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -3000,11 +3000,12 @@ sshpkt_protocol_error(struct ssh *ssh, const char *fmt,...)
va_end(args);
logit("Disconnecting %s: %.100s", remote_id, buf);
+ if (ssh->state == NULL)
+ cleanup_exit(255); /* Can't poison? then exit */
+
if ((r = sshpkt_disconnect(ssh, "%s", buf)) != 0 ||
(r = ssh_packet_write_wait(ssh)) != 0)
return r;
- if (ssh->state == NULL)
- cleanup_exit(255); /* Can't poison? then exit */
ssh->state->poisoned = 1;
return SSH_ERR_PROTOCOL_ERROR;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list