Fixed base64_decode() reject empty input buffers

This commit is contained in:
Jouni Malinen 2008-02-27 17:49:59 -08:00
parent 380da72b80
commit 72822e7be4

View file

@ -115,7 +115,7 @@ unsigned char * base64_decode(const unsigned char *src, size_t len,
count++; count++;
} }
if (count % 4) if (count == 0 || count % 4)
return NULL; return NULL;
olen = count / 4 * 3; olen = count / 4 * 3;