projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
359b0c9
)
PR: 2250
author
Dr. Stephen Henson
<steve@openssl.org>
Mon, 3 May 2010 12:24:01 +0000
(12:24 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Mon, 3 May 2010 12:24:01 +0000
(12:24 +0000)
Submitted By: Ger Hobbelt <ger@hobbelt.com>
Don't overwrite return value with strlen(f).
crypto/x509/x509_cmp.c
patch
|
blob
|
history
diff --git
a/crypto/x509/x509_cmp.c
b/crypto/x509/x509_cmp.c
index a75876edbbc5bc5e57d8a8cfc49b65f93f39cbf4..67a84d17d30712b8beb2f91a678bbf547f3df8f9 100644
(file)
--- 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,