diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-05-03 12:24:01 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-05-03 12:24:01 +0000 |
commit | a033c3c72bc292a8795dc26a250f1b9e2dc27c63 (patch) | |
tree | 35954e777d56b9ce5c804f6fb173502dffe71b05 /crypto/x509/x509_cmp.c | |
parent | 359b0c9fb8ccb5f492cc918f7e4c6319e15af16b (diff) |
PR: 2250
Submitted By: Ger Hobbelt <ger@hobbelt.com>
Don't overwrite return value with strlen(f).
Diffstat (limited to 'crypto/x509/x509_cmp.c')
-rw-r--r-- | crypto/x509/x509_cmp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index a75876edbb..67a84d17d3 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -86,10 +86,9 @@ unsigned long X509_issuer_and_serial_hash(X509 *a) EVP_MD_CTX_init(&ctx); f=X509_NAME_oneline(a->cert_info->issuer,NULL,0); - ret=strlen(f); if (!EVP_DigestInit_ex(&ctx, EVP_md5(), NULL)) goto err; - if (!EVP_DigestUpdate(&ctx,(unsigned char *)f,ret)) + if (!EVP_DigestUpdate(&ctx,(unsigned char *)f,strlen(f))) goto err; OPENSSL_free(f); if(!EVP_DigestUpdate(&ctx,(unsigned char *)a->cert_info->serialNumber->data, |