From 51be0ed659d0c8e86ef28b0de3da6b38809fa170 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 30 May 2023 20:11:13 +0200 Subject: [PATCH] host: fix crash parsing gateway when no endpoint is specified Signed-off-by: Felix Fietkau --- host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host.c b/host.c index 7522e8b..e4e38d3 100644 --- a/host.c +++ b/host.c @@ -179,7 +179,7 @@ network_host_create(struct network *net, struct blob_attr *attr, bool dynamic) &ipaddr, ipaddr_len, &subnet, subnet_len, &endpoint_buf, endpoint ? strlen(endpoint) + 1 : 0, - &gateway_buf, gateway ? strlen(endpoint) + 1 : 0); + &gateway_buf, gateway ? strlen(gateway) + 1 : 0); host->node.key = strcpy(name_buf, name); peer = &host->peer; } -- 2.30.2