aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport/socket/sockfd.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-22 18:43:13 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-22 18:43:13 -0800
commitdacb9629b9161cbd09de533842bb05ee0b0cad48 (patch)
treede0c8a70440c3f7e8dea5763e5a6d4a3aef32284 /src/sp/transport/socket/sockfd.c
parentcef6e70c0b3e92e36b6895e7d6e981b00c702f9b (diff)
downloadnng-dacb9629b9161cbd09de533842bb05ee0b0cad48.tar.gz
nng-dacb9629b9161cbd09de533842bb05ee0b0cad48.tar.bz2
nng-dacb9629b9161cbd09de533842bb05ee0b0cad48.zip
Fix socket:// hostname should be null, and add test case
Diffstat (limited to 'src/sp/transport/socket/sockfd.c')
-rw-r--r--src/sp/transport/socket/sockfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp/transport/socket/sockfd.c b/src/sp/transport/socket/sockfd.c
index 03706be8..d3d4218f 100644
--- a/src/sp/transport/socket/sockfd.c
+++ b/src/sp/transport/socket/sockfd.c
@@ -818,7 +818,7 @@ sfd_tran_listener_init(void **lp, nng_url *url, nni_listener *nlistener)
nni_sock *sock = nni_listener_sock(nlistener);
// Check for invalid URL components -- we only accept a bare scheme
- if ((strlen(url->u_hostname) != 0) || (strlen(url->u_path) != 0) ||
+ if ((url->u_hostname != NULL) || (strlen(url->u_path) != 0) ||
(url->u_fragment != NULL) || (url->u_userinfo != NULL) ||
(url->u_query != NULL)) {
return (NNG_EADDRINVAL);