aboutsummaryrefslogtreecommitdiffstats
path: root/src/liboptions
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2019-08-14 08:39:18 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2019-08-26 21:10:34 +0200
commitb9fe47e85d138f8555cc9c821c50a94844024494 (patch)
tree0a69eda9f7a716b36efa41e3bc7ec655a99f2f29 /src/liboptions
parentaf4bcb15223cd1d529d428b8c32a220a67a81408 (diff)
Fixed use-after-free bug (config file handling)
Diffstat (limited to 'src/liboptions')
-rw-r--r--src/liboptions/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liboptions/options.c b/src/liboptions/options.c
index e9cc25b..f9cec12 100644
--- a/src/liboptions/options.c
+++ b/src/liboptions/options.c
@@ -137,7 +137,7 @@ int options_config_file(const char *config_file, int (*handle_options)(int short
PDEBUG(DOPTIONS, DEBUG_ERROR, "Given option '%s' in config file '%s' at line %d requires %d parameter(s), use '-h' for help!\n", opt, config_file, line, option->parameter_count);
return -EINVAL;
}
- argv[0] = param;
+ argv[0] = strdup(param);
rc = handle_options(option->short_option, 0, argv);
if (rc <= 0)
goto done;