summaryrefslogtreecommitdiffstats
path: root/src/appl/bsd/krshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/appl/bsd/krshd.c')
-rw-r--r--src/appl/bsd/krshd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c
index 5a9baa3797..e780216fa9 100644
--- a/src/appl/bsd/krshd.c
+++ b/src/appl/bsd/krshd.c
@@ -1513,12 +1513,11 @@ void doit(f, fromp)
struct stat s2;
int offst = 0;
- copy = malloc(strlen(cmdbuf) + 1);
+ copy = strdup(cmdbuf);
if (copy == NULL) {
perror("malloc");
_exit(1);
}
- strcpy(copy, cmdbuf);
if (do_encrypt && !strncmp(cmdbuf, "-x ", 3)) {
offst = 3;
}