Fix a use-after-free bug in para_server.
authorAndre Noll <maan@systemlinux.org>
Wed, 24 Oct 2007 12:00:30 +0000 (14:00 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 24 Oct 2007 12:01:06 +0000 (14:01 +0200)
This bug bites on SIGHUP if a config file was specified at the command line.

server.c

index e39354e769ec04dc629c63f0bd590df30893dc8d..b2242e070e7937985b5a6666b91d26ef6b86f60f 100644 (file)
--- a/server.c
+++ b/server.c
@@ -216,7 +216,7 @@ static void parse_config(int override)
        char *cf;
 
        if (conf.config_file_given)
-               cf = conf.config_file_arg;
+               cf = para_strdup(conf.config_file_arg);
        else
                cf = make_message("%s/.paraslash/server.conf", home);
        free(user_list_file);