[openssh-commits] [openssh] branch master updated: upstream: another ruser_name/ruser_group vs attrib_to_stat() ordering
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Jun 30 12:32:52 AEST 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new dcba967d3 upstream: another ruser_name/ruser_group vs attrib_to_stat() ordering
dcba967d3 is described below
commit dcba967d3f39f89d17634e550e1741b2b91f4c5c
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Jun 30 02:30:19 2026 +0000
upstream: another ruser_name/ruser_group vs attrib_to_stat() ordering
screwup. Coverity CID 910530 via dtucker@
OpenBSD-Commit-ID: d8c4656119f09304e79fcf2ab32299ed68006a29
---
sftp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sftp.c b/sftp.c
index a526fade2..31d8fa494 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.256 2026/06/30 00:10:48 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.257 2026/06/30 02:30:19 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm at openbsd.org>
*
@@ -901,12 +901,12 @@ do_ls_dir(struct sftp_conn *conn, const char *path,
struct stat sb;
const char *user = NULL, *group = NULL;
+ memset(&sb, 0, sizeof(sb));
+ attrib_to_stat(&d[n]->a, &sb);
if ((lflag & LS_NUMERIC_VIEW) == 0) {
user = ruser_name(sb.st_uid);
group = rgroup_name(sb.st_gid);
}
- memset(&sb, 0, sizeof(sb));
- attrib_to_stat(&d[n]->a, &sb);
lname = ls_file(fname, &sb, 1,
(lflag & LS_SI_UNITS), user, group);
mprintf("%s\n", lname);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list