[openssh-commits] [openssh] 03/06: upstream: ssh-agent: no unlink(2) on empty filename

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Oct 1 08:51:00 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit ed67a24515aa65fded1e10426198a4251f836338
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Sep 22 22:30:27 2026 +0000

    upstream: ssh-agent: no unlink(2) on empty filename
    
    from markus@ ok me
    
    OpenBSD-Commit-ID: 7a517a64389e389e5d23f781d1762c2b6aaffe98
---
 ssh-agent.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ssh-agent.c b/ssh-agent.c
index 2a7e1d259..9951345dd 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.332 2026/09/16 00:25:50 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.333 2026/09/22 22:30:27 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2493,7 +2493,8 @@ main(int ac, char **av)
 		socket_name = xstrdup(agentsocket);
 		if ((sock = unix_listener(socket_name,
 		    SSH_LISTEN_BACKLOG, 0)) < 0) {
-			*socket_name = '\0'; /* Don't unlink existing file */
+			free(socket_name);
+			socket_name = NULL; /* Don't unlink existing file */
 			cleanup_exit(1);
 		}
 		umask(prev_mask);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list