]> granicus.if.org Git - openssl/commitdiff
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 2968f6460ad131fd5269c6d615631924c720f91e..2d738f4b0108fb8c0f98301d2080426dce7f8424 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