summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c
index 3aa6ea92b..272dfcb8f 100644
--- a/src/install.c
+++ b/src/install.c
@@ -502,8 +502,13 @@ strip (char const *name)
error (0, errno, _("fork system call failed"));
break;
case 0: /* Child. */
- execlp (strip_program, strip_program, name, NULL);
- die (EXIT_FAILURE, errno, _("cannot run %s"), quoteaf (strip_program));
+ {
+ char const *safe_name = name;
+ if (name && *name == '-')
+ safe_name = file_name_concat (".", name, NULL);
+ execlp (strip_program, strip_program, safe_name, NULL);
+ die (EXIT_FAILURE, errno, _("cannot run %s"), quoteaf (strip_program));
+ }
default: /* Parent. */
if (waitpid (pid, &status, 0) < 0)
error (0, errno, _("waiting for strip"));