From: Jouni Malinen Date: Thu, 28 Feb 2008 01:49:59 +0000 (-0800) Subject: Fixed base64_decode() reject empty input buffers X-Git-Tag: hostap_0_6_4~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72822e7be44196967b4059fc1f955fbe590a8702;p=thirdparty%2Fhostap.git Fixed base64_decode() reject empty input buffers --- diff --git a/src/utils/base64.c b/src/utils/base64.c index 3407949ff..0eadb8142 100644 --- a/src/utils/base64.c +++ b/src/utils/base64.c @@ -115,7 +115,7 @@ unsigned char * base64_decode(const unsigned char *src, size_t len, count++; } - if (count % 4) + if (count == 0 || count % 4) return NULL; olen = count / 4 * 3;