]> git.tue.mpg.de Git - paraslash.git/commitdiff
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:00:30 +0000 (14:00 +0200)
This bug bites on SIGHUP if a config file was specified at the command line.

server.c

index c7760de1167e56bc1388f05da46aeb2d2999944e..f435104b49822179ff682fa50bccac954651fd26 100644 (file)
--- a/server.c
+++ b/server.c
@@ -191,7 +191,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);