Make sure we get the definition of OPENSSL_NO_IDEA.
[openssl.git] / crypto / evp / encode.c
index 12c6379df1826547aac9ca27e54e3e64d6c402ee..08209357ce0a3230b5aad4b38ee11be22c1e4ffb 100644 (file)
@@ -136,6 +136,7 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
 
        *outl=0;
        if (inl == 0) return;
+       OPENSSL_assert(ctx->length <= sizeof ctx->enc_data);
        if ((ctx->num+inl) < ctx->length)
                {
                memcpy(&(ctx->enc_data[ctx->num]),in,inl);
@@ -258,6 +259,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
                /* only save the good data :-) */
                if (!B64_NOT_BASE64(v))
                        {
+                       OPENSSL_assert(n < sizeof ctx->enc_data);
                        d[n++]=tmp;
                        ln++;
                        }