From 00774b3f92bd6898ce56f41ce39074e9fe89c08e Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 30 Sep 2023 09:38:18 +0000 Subject: Some fixes; new SERVER_NAME source; prepare for more config Signed-off-by: Laurent Bercot --- src/libtipidee/tipidee_uri_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libtipidee/tipidee_uri_parse.c') diff --git a/src/libtipidee/tipidee_uri_parse.c b/src/libtipidee/tipidee_uri_parse.c index 10b0f91..6f0064a 100644 --- a/src/libtipidee/tipidee_uri_parse.c +++ b/src/libtipidee/tipidee_uri_parse.c @@ -154,7 +154,7 @@ size_t tipidee_uri_parse (char *out, size_t max, char const *in, tipidee_uri *ur if (c & 0x4000) host = out + w ; if (c & 0x2000) { if (w >= max) return 0 ; out[w++] = 0 ; } if (c & 0x1000) mark = w ; - if (c & 0x0800) { if (!uint160_scan(out + mark, &port)) return 0 ; w = mark ; } + if (c & 0x0800) { if (!uint160_scan(out + mark, &port) || !port) return 0 ; w = mark ; } if (c & 0x0400) path = out + w ; if (c & 0x0200) { if (w >= max) return 0 ; out[w++] = *in ; } if (c & 0x0100) query = out + w ; -- cgit v1.3.1