summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2007-04-18 21:14:46 +0000
committerDenis Vlasenko2007-04-18 21:14:46 +0000
commit088b959d00a5df6e0d9436d6e3aec20458774ebc (patch)
treea8eb83df9dbbdd6e318252a41b40b944611f8a2e
parent2ace1e3f07c819743554b317f4219e21eff06d6b (diff)
downloadbusybox-088b959d00a5df6e0d9436d6e3aec20458774ebc.zip
busybox-088b959d00a5df6e0d9436d6e3aec20458774ebc.tar.gz
"Unify base64 handling" is done, remove TODO
-rw-r--r--TODO7
-rw-r--r--networking/httpd.c5
2 files changed, 3 insertions, 9 deletions
diff --git a/TODO b/TODO
index 5fe7f02..10ed7e0 100644
--- a/TODO
+++ b/TODO
@@ -36,12 +36,7 @@ Rob Landley <rob@landley.net>:
modutils. The orig depmod is rather pointless to have to add to a firmware image
in when we already have a insmod/rmmod and friends.
Unify base64 handling.
- There's base64 encoding and decoding going on in:
- networking/wget.c:base64enc()
- coreutils/uudecode.c:read_base64()
- coreutils/uuencode.c:tbl_base64[]
- networking/httpd.c:decodeBase64()
- And probably elsewhere. That needs to be unified into libbb functions.
+ [done]
Do a SUSv3 audit
Look at the full Single Unix Specification version 3 (available online at
"http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and
diff --git a/networking/httpd.c b/networking/httpd.c
index 1f7c886..d8ea483 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -765,10 +765,9 @@ static void setenv_long(const char *name, long value)
****************************************************************************/
static void decodeBase64(char *Data)
{
-
const unsigned char *in = (const unsigned char *)Data;
// The decoded size will be at most 3/4 the size of the encoded
- unsigned long ch = 0;
+ unsigned ch = 0;
int i = 0;
while (*in) {
@@ -798,7 +797,7 @@ static void decodeBase64(char *Data)
i = 0;
}
}
- *Data = 0;
+ *Data = '\0';
}
#endif