From 72822e7be44196967b4059fc1f955fbe590a8702 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 27 Feb 2008 17:49:59 -0800 Subject: [PATCH] Fixed base64_decode() reject empty input buffers --- src/utils/base64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;