diff options
Diffstat (limited to 'crypto/openssl/crypto/asn1/a_digest.c')
-rw-r--r-- | crypto/openssl/crypto/asn1/a_digest.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/openssl/crypto/asn1/a_digest.c b/crypto/openssl/crypto/asn1/a_digest.c index 4931e222a05e..d00d9e22b188 100644 --- a/crypto/openssl/crypto/asn1/a_digest.c +++ b/crypto/openssl/crypto/asn1/a_digest.c @@ -65,20 +65,25 @@ # include <sys/types.h> #endif +#include <openssl/err.h> #include <openssl/evp.h> #include <openssl/buffer.h> #include <openssl/x509.h> #ifndef NO_ASN1_OLD -int ASN1_digest(int (*i2d)(), const EVP_MD *type, char *data, +int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data, unsigned char *md, unsigned int *len) { int i; unsigned char *str,*p; i=i2d(data,NULL); - if ((str=(unsigned char *)OPENSSL_malloc(i)) == NULL) return(0); + if ((str=(unsigned char *)OPENSSL_malloc(i)) == NULL) + { + ASN1err(ASN1_F_ASN1_DIGEST,ERR_R_MALLOC_FAILURE); + return(0); + } p=str; i2d(data,&p); |