From de729d1148964bf365078aee4725d5ca8246b489 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Mon, 30 Mar 2026 07:46:21 -0400 Subject: [PATCH] p9dial: fix uninitialized sockaddr for local bind When `p9dial` is given a non-nil "local" address to bind to, the dial string was mistakening parsed into the _remote_ address structure, and not the structure representing the local address. It should, of course, parse into the local address structure. This was flagged by a warning about passing a const pointer to an uninitialized variable to `bind(2)`. Signed-off-by: Dan Cross --- src/lib9/dial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib9/dial.c b/src/lib9/dial.c index 81e3a830..1884e3a1 100644 --- a/src/lib9/dial.c +++ b/src/lib9/dial.c @@ -99,7 +99,7 @@ p9dial(char *addr, char *local, char *dummy2, int *dummy3) close(s); return -1; } - if(p9dialparse(buf, &net, &unix, &ss, &port) < 0){ + if(p9dialparse(buf, &net, &unix, &ssl, &port) < 0){ badlocal: free(buf); close(s);