summaryrefslogtreecommitdiff
path: root/coreutils/uudecode.c
diff options
context:
space:
mode:
authorEric Andersen2001-08-02 05:02:46 +0000
committerEric Andersen2001-08-02 05:02:46 +0000
commit34506361697643277042fc8d7294bc17a27d4e28 (patch)
treebf2c45a12020be4e0a37547abb50c40c0074e8ec /coreutils/uudecode.c
parent2d91deba45d5a284614e06cc55e2be03599ca26d (diff)
downloadbusybox-34506361697643277042fc8d7294bc17a27d4e28.zip
busybox-34506361697643277042fc8d7294bc17a27d4e28.tar.gz
Latest patch from vodz. Adds a check for divide by zero in the posix
math suport, cleaner math syntax error checking, moves redundant signal string tables (from kill and ash) into libbb and provides a few cleanups elsewhere.
Diffstat (limited to 'coreutils/uudecode.c')
-rw-r--r--coreutils/uudecode.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 6ac9f1b..a4059dd 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -201,9 +201,8 @@ static int decode (const char *inname,
const char *forced_outname)
{
struct passwd *pw;
- register int n;
register char *p;
- int mode, n1;
+ int mode;
char buf[2 * BUFSIZ];
char *outname;
int do_base64 = 0;
@@ -249,12 +248,7 @@ static int decode (const char *inname,
error_msg("%s: No user `%s'", inname, buf + 1);
return FALSE;
}
- n = strlen (pw->pw_dir);
- n1 = strlen (p);
- outname = (char *) xmalloc ((size_t) (n + n1 + 2));
- memcpy (outname + n + 1, p, (size_t) (n1 + 1));
- memcpy (outname, pw->pw_dir, (size_t) n);
- outname[n] = '/';
+ outname = concat_path_file(pw->pw_dir, p);
dofre = TRUE;
}
}