]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fixed base64_decode() reject empty input buffers
authorJouni Malinen <j@w1.fi>
Thu, 28 Feb 2008 01:49:59 +0000 (17:49 -0800)
committerJouni Malinen <j@w1.fi>
Thu, 28 Feb 2008 01:49:59 +0000 (17:49 -0800)
src/utils/base64.c

index 3407949ff4dcc8a1cc3b715ff36117df21c93acb..0eadb8142f6629ea305696564bdaba930f7111ab 100644 (file)
@@ -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;