upstream: fix inverted test that broke ssh-add with keys on stdin. From

Laurence Tratt

OpenBSD-Commit-ID: bcef522cfa587c7cf035660bb347cff36b65bfbd
This commit is contained in:
djm@openbsd.org authored and Damien Miller committed 2026-07-05 10:18:33 +10:00
1 parent aab5620a66
commit 93d6348ae4
1 file changed
+2 -2
+2 -2
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: sshbuf-io.c,v 1.3 2026/06/29 09:14:25 djm Exp $ */
/* $OpenBSD: sshbuf-io.c,v 1.4 2026/07/05 00:16:21 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -61,7 +61,7 @@ sshbuf_load_fd(int fd, struct sshbuf **blobp)
goto out;
}
}
if (S_ISREG(st.st_mode) == 0 &&
if (S_ISREG(st.st_mode) != 0 &&
st.st_size != (off_t)sshbuf_len(blob)) {
r = SSH_ERR_FILE_CHANGED;
goto out;