EVP: allow empty strings to EVP_Decode* functions
[openssl.git] / crypto / evp / encode.c
index fb657d14996eb9addf10d8dbafe3139d49119eb5..01552ac0982b92dc132d0dc095f71a52e0c43548 100644 (file)
@@ -423,7 +423,7 @@ static int evp_decodeblock_int(EVP_ENCODE_CTX *ctx, unsigned char *t,
         table = data_ascii2bin;
 
     /* trim white space from the start of the line. */
-    while ((conv_ascii2bin(*f, table) == B64_WS) && (n > 0)) {
+    while ((n > 0) && (conv_ascii2bin(*f, table) == B64_WS)) {
         f++;
         n--;
     }