aboutsummaryrefslogtreecommitdiff
path: root/src/rc/start-stop-daemon.c
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2020-11-18 11:08:47 +0100
committerWilliam Hubbs <w.d.hubbs@gmail.com>2020-11-20 09:22:18 -0600
commitaa0fdf6d08b987dfcabebf5b8d05beff015ad8f4 (patch)
treeee84d2a1ceaaeaad64e66cbcacfe2cd638d84ee7 /src/rc/start-stop-daemon.c
parentb6fef599bf8493480664b766040fa9b0d4b1e335 (diff)
start-stop-daemon: Don't segfault if --exec was given a non-existing file name
Starting program: /sbin/start-stop-daemon --start --exec i-dont-exist Program received signal SIGSEGV, Segmentation fault. 0x0000555555559053 in main (argc=1, argv=0x7fffffffdc20) at start-stop-daemon.c:631 631 *exec_file ? exec_file : exec); This fixes #385.
Diffstat (limited to 'src/rc/start-stop-daemon.c')
-rw-r--r--src/rc/start-stop-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index 77794a6c..aafada88 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -628,7 +628,7 @@ int main(int argc, char **argv)
}
if (start && !exists(exec_file)) {
eerror("%s: %s does not exist", applet,
- *exec_file ? exec_file : exec);
+ exec_file ? exec_file : exec);
free(exec_file);
exit(EXIT_FAILURE);
}