From 691c9878f41d6646af38f417b23dfc72644a8c96 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 30 Nov 2023 21:10:29 +0000 Subject: Don't segfault on no PROTO! Signed-off-by: Laurent Bercot --- src/tipideed/tipideed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tipideed/tipideed.c') diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c index 1c07cf3..0f5d44c 100644 --- a/src/tipideed/tipideed.c +++ b/src/tipideed/tipideed.c @@ -66,9 +66,9 @@ static inline void prep_env (size_t *remoteip, size_t *remotehost) if (x) stralloc_catb(&g.sa, sslvars, sizeof(sslvars)) ; g.ssl = !!x ; x = getenv(basevars) ; + if (!x) strerr_dienotset(100, "PROTO") ; protolen = strlen(x) ; if (protolen > 1000) strerr_dieinvalid(100, "PROTO") ; - if (!x) strerr_dienotset(100, "PROTO") ; { size_t m ; ip46 ip ; -- cgit v1.2.3