summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/evp/encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/evp/encode.c')
-rw-r--r--crypto/openssl/crypto/evp/encode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/evp/encode.c b/crypto/openssl/crypto/evp/encode.c
index 12c6379..0820935 100644
--- a/crypto/openssl/crypto/evp/encode.c
+++ b/crypto/openssl/crypto/evp/encode.c
@@ -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++;
}
OpenPOWER on IntegriCloud