libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 8a5cf8f14fbb30db62fd5be65920227057506fdb
parent 9006e7df90a12bcee21ffbe7dfa3319b26f745ed
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  3 Mar 2011 20:45:20 +0000

fixing 1666

Diffstat:
MChangeLog | 4++++
Msrc/daemon/base64.c | 4++--
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,7 @@ +Thu Mar 3 21:42:47 CET 2011 + Fixing issue where Base64 decode fails when char is defined + as unsigned char (Mantis 1666). -CG/tmayer + Tue Mar 1 13:58:04 CET 2011 Allow use of 'poll' in combination with the external select mode. Avoid using pthread signals (SIGALRM), use pipe instead. diff --git a/src/daemon/base64.c b/src/daemon/base64.c @@ -46,10 +46,10 @@ char* BASE64Decode(const char* src) { char c = base64_digits[(unsigned char)*(src++)]; char d = base64_digits[(unsigned char)*(src++)]; *(dest++) = (a << 2) | ((b & 0x30) >> 4); - if (c == -1) + if (c == (char)-1) break; *(dest++) = ((b & 0x0f) << 4) | ((c & 0x3c) >> 2); - if (d == -1) + if (d == (char)-1) break; *(dest++) = ((c & 0x03) << 6) | d; }