summaryrefslogtreecommitdiff
path: root/src/libtipidee/tipidee_uri_parse.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-30 09:38:18 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-30 09:38:18 +0000
commit00774b3f92bd6898ce56f41ce39074e9fe89c08e (patch)
treedeeb2a9b483ed3e4e637fc0ea744c65cc64d1763 /src/libtipidee/tipidee_uri_parse.c
parentf1a6903f46c0e2edcdd2b7fa83c8a5bb4ca0e021 (diff)
downloadtipidee-00774b3f92bd6898ce56f41ce39074e9fe89c08e.tar.xz
Some fixes; new SERVER_NAME source; prepare for more config
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libtipidee/tipidee_uri_parse.c')
-rw-r--r--src/libtipidee/tipidee_uri_parse.c2
1 files changed, 1 insertions, 1 deletions
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 ;