Erik Sjölund
2025-Apr-17 19:31 UTC
Is initalization missing for socket_name and socket_dir?
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)
Erik Sjölund
2025-Apr-18 08:10 UTC
Is initalization missing for socket_name and socket_dir?
I was confused about C syntax. socket_name and socket_dir are already initialized. Sorry about the noise. On Thu, Apr 17, 2025 at 9:31?PM Erik Sj?lund <erik.sjolund at gmail.com> wrote:> > 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)