diff options
-rw-r--r-- | TODO | 7 | ||||
-rw-r--r-- | networking/httpd.c | 5 |
2 files changed, 3 insertions, 9 deletions
@@ -36,12 +36,7 @@ Rob Landley <rob@landley.net>: | |||
36 | modutils. The orig depmod is rather pointless to have to add to a firmware image | 36 | modutils. The orig depmod is rather pointless to have to add to a firmware image |
37 | in when we already have a insmod/rmmod and friends. | 37 | in when we already have a insmod/rmmod and friends. |
38 | Unify base64 handling. | 38 | Unify base64 handling. |
39 | There's base64 encoding and decoding going on in: | 39 | [done] |
40 | networking/wget.c:base64enc() | ||
41 | coreutils/uudecode.c:read_base64() | ||
42 | coreutils/uuencode.c:tbl_base64[] | ||
43 | networking/httpd.c:decodeBase64() | ||
44 | And probably elsewhere. That needs to be unified into libbb functions. | ||
45 | Do a SUSv3 audit | 40 | Do a SUSv3 audit |
46 | Look at the full Single Unix Specification version 3 (available online at | 41 | Look at the full Single Unix Specification version 3 (available online at |
47 | "http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and | 42 | "http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and |
diff --git a/networking/httpd.c b/networking/httpd.c index 1f7c886de..d8ea483eb 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -765,10 +765,9 @@ static void setenv_long(const char *name, long value) | |||
765 | ****************************************************************************/ | 765 | ****************************************************************************/ |
766 | static void decodeBase64(char *Data) | 766 | static void decodeBase64(char *Data) |
767 | { | 767 | { |
768 | |||
769 | const unsigned char *in = (const unsigned char *)Data; | 768 | const unsigned char *in = (const unsigned char *)Data; |
770 | // The decoded size will be at most 3/4 the size of the encoded | 769 | // The decoded size will be at most 3/4 the size of the encoded |
771 | unsigned long ch = 0; | 770 | unsigned ch = 0; |
772 | int i = 0; | 771 | int i = 0; |
773 | 772 | ||
774 | while (*in) { | 773 | while (*in) { |
@@ -798,7 +797,7 @@ static void decodeBase64(char *Data) | |||
798 | i = 0; | 797 | i = 0; |
799 | } | 798 | } |
800 | } | 799 | } |
801 | *Data = 0; | 800 | *Data = '\0'; |
802 | } | 801 | } |
803 | #endif | 802 | #endif |
804 | 803 | ||