From ca95b915c5db208af77826f0875313bef895993f Mon Sep 17 00:00:00 2001 From: Simon Schubert <2@0x2c.org> Date: Mon, 2 Jan 2012 20:40:22 +0100 Subject: [PATCH] parse_conf: fix bug with masqueraded domains We need to clear the @ symbol instead of NULLing the pointer. Found-by: clang static analysis --- conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.c b/conf.c index 29b6e1b..4e15b59 100644 --- a/conf.c +++ b/conf.c @@ -207,7 +207,7 @@ parse_conf(const char *config_path) char *user = NULL, *host = NULL; if (strrchr(data, '@')) { host = strrchr(data, '@'); - host = 0; + *host = 0; host++; user = data; } else { -- 2.39.2