If input is bad, we still need to clear the buffer.
authorBen Laurie <ben@openssl.org>
Sun, 3 Apr 2005 16:38:22 +0000 (16:38 +0000)
committerBen Laurie <ben@openssl.org>
Sun, 3 Apr 2005 16:38:22 +0000 (16:38 +0000)
crypto/evp/encode.c

index 2968f64..2d738f4 100644 (file)
@@ -323,8 +323,8 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
                        if (n > 0)
                                {
                                v=EVP_DecodeBlock(out,d,n);
-                               if (v < 0) { rv=0; goto end; }
                                n=0;
+                               if (v < 0) { rv=0; goto end; }
                                ret+=(v-eof);
                                }
                        else