Is initalization missing for socket_name and socket_dir?

Erik Sjölund erik.sjolund at gmail.com
Fri Apr 18 05:31:21 AEST 2025


In the PR
https://github.com/openssh/openssh-portable/pull/502
the variables socket_name and socket_dir are initialized here:
https://github.com/dkg/openssh-portable/blob/31873e2f6f841f20aeff5d0368cba71af4bb1352/ssh-agent.c#L2352-L2353
but the those lines didn't make it into the final version.

Could socket_name[0] be uninitialized here:
https://github.com/openssh/openssh-portable/blob/9b50cb171b5c56184ce6fa3994ce62f9882d2daf/ssh-agent.c#L2437
?

Maybe something like the attached patch is needed?
(This is untested code)


More information about the openssh-unix-dev mailing list