diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/evp/encode.c | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/libcrypto/evp/encode.c b/src/lib/libcrypto/evp/encode.c index 12c6379df1..08209357ce 100644 --- a/src/lib/libcrypto/evp/encode.c +++ b/src/lib/libcrypto/evp/encode.c  | |||
| @@ -136,6 +136,7 @@ void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
| 136 | 136 | ||
| 137 | *outl=0; | 137 | *outl=0; | 
| 138 | if (inl == 0) return; | 138 | if (inl == 0) return; | 
| 139 | OPENSSL_assert(ctx->length <= sizeof ctx->enc_data); | ||
| 139 | if ((ctx->num+inl) < ctx->length) | 140 | if ((ctx->num+inl) < ctx->length) | 
| 140 | { | 141 | { | 
| 141 | memcpy(&(ctx->enc_data[ctx->num]),in,inl); | 142 | memcpy(&(ctx->enc_data[ctx->num]),in,inl); | 
| @@ -258,6 +259,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
| 258 | /* only save the good data :-) */ | 259 | /* only save the good data :-) */ | 
| 259 | if (!B64_NOT_BASE64(v)) | 260 | if (!B64_NOT_BASE64(v)) | 
| 260 | { | 261 | { | 
| 262 | OPENSSL_assert(n < sizeof ctx->enc_data); | ||
| 261 | d[n++]=tmp; | 263 | d[n++]=tmp; | 
| 262 | ln++; | 264 | ln++; | 
| 263 | } | 265 | } | 
