diff options
Diffstat (limited to 'coreutils/uuencode.c')
-rw-r--r-- | coreutils/uuencode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c index bf661851d..fe9e8c664 100644 --- a/coreutils/uuencode.c +++ b/coreutils/uuencode.c | |||
@@ -5,13 +5,13 @@ | |||
5 | * based on the function base64_encode from http.c in wget v1.6 | 5 | * based on the function base64_encode from http.c in wget v1.6 |
6 | * Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. | 6 | * Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. |
7 | * | 7 | * |
8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include "libbb.h" | 11 | #include "libbb.h" |
12 | 12 | ||
13 | enum { | 13 | enum { |
14 | SRC_BUF_SIZE = 45, /* This *MUST* be a multiple of 3 */ | 14 | SRC_BUF_SIZE = 15*3, /* This *MUST* be a multiple of 3 */ |
15 | DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3), | 15 | DST_BUF_SIZE = 4 * ((SRC_BUF_SIZE + 2) / 3), |
16 | }; | 16 | }; |
17 | 17 | ||
@@ -33,7 +33,7 @@ int uuencode_main(int argc UNUSED_PARAM, char **argv) | |||
33 | } | 33 | } |
34 | argv += optind; | 34 | argv += optind; |
35 | if (argv[1]) { | 35 | if (argv[1]) { |
36 | src_fd = xopen(*argv, O_RDONLY); | 36 | src_fd = xopen(argv[0], O_RDONLY); |
37 | fstat(src_fd, &stat_buf); | 37 | fstat(src_fd, &stat_buf); |
38 | mode = stat_buf.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); | 38 | mode = stat_buf.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); |
39 | argv++; | 39 | argv++; |