aboutsummaryrefslogtreecommitdiff
path: root/uudecode.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-08-02 05:02:46 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-08-02 05:02:46 +0000
commitf4eebef50a14b8f804aed9a13f6437c6550b348e (patch)
treebf2c45a12020be4e0a37547abb50c40c0074e8ec /uudecode.c
parentdcfdcb7f829849a4b6d14b162cfab8e7c381fd2f (diff)
downloadbusybox-w32-f4eebef50a14b8f804aed9a13f6437c6550b348e.tar.gz
busybox-w32-f4eebef50a14b8f804aed9a13f6437c6550b348e.tar.bz2
busybox-w32-f4eebef50a14b8f804aed9a13f6437c6550b348e.zip
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. git-svn-id: svn://busybox.net/trunk/busybox@3181 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'uudecode.c')
-rw-r--r--uudecode.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/uudecode.c b/uudecode.c
index 6ac9f1bf3..a4059ddfe 100644
--- a/uudecode.c
+++ b/uudecode.c
@@ -201,9 +201,8 @@ static int decode (const char *inname,
201 const char *forced_outname) 201 const char *forced_outname)
202{ 202{
203 struct passwd *pw; 203 struct passwd *pw;
204 register int n;
205 register char *p; 204 register char *p;
206 int mode, n1; 205 int mode;
207 char buf[2 * BUFSIZ]; 206 char buf[2 * BUFSIZ];
208 char *outname; 207 char *outname;
209 int do_base64 = 0; 208 int do_base64 = 0;
@@ -249,12 +248,7 @@ static int decode (const char *inname,
249 error_msg("%s: No user `%s'", inname, buf + 1); 248 error_msg("%s: No user `%s'", inname, buf + 1);
250 return FALSE; 249 return FALSE;
251 } 250 }
252 n = strlen (pw->pw_dir); 251 outname = concat_path_file(pw->pw_dir, p);
253 n1 = strlen (p);
254 outname = (char *) xmalloc ((size_t) (n + n1 + 2));
255 memcpy (outname + n + 1, p, (size_t) (n1 + 1));
256 memcpy (outname, pw->pw_dir, (size_t) n);
257 outname[n] = '/';
258 dofre = TRUE; 252 dofre = TRUE;
259 } 253 }
260 } 254 }