aboutsummaryrefslogtreecommitdiff
path: root/src/relocation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/relocation.c')
-rw-r--r--src/relocation.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/relocation.c b/src/relocation.c
index 473624a..1ba95d5 100644
--- a/src/relocation.c
+++ b/src/relocation.c
@@ -296,12 +296,14 @@ int relocate(const char *_filename, const char *_oldstr, const char *_newstr) {
char *filename = strdup(_filename);
char cmd[PATH_MAX];
+ // sanitize command
+ strchrdel(oldstr, "&;|");
+ strchrdel(newstr, "&;|");
+ strchrdel(filename, "&;|");
+
memset(cmd, '\0', sizeof(cmd));
sprintf(cmd, "reloc \"%s\" \"%s\" \"%s\" \"%s\" 2>&1", oldstr, newstr, filename, filename);
- // sanitize command
- strchrdel(cmd, "&;|");
-
shell(&proc, SHELL_OUTPUT, cmd);
if (!proc) {
free(oldstr);