Browse Source

Fixed base64_decode() reject empty input buffers

Jouni Malinen 17 years ago
parent
commit
72822e7be4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/utils/base64.c

+ 1 - 1
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;