Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: openssl/crypto/evp/bio_md.c

Issue 9254031: Upgrade chrome's OpenSSL to same version Android ships with. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/openssl/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « openssl/crypto/evp/bio_enc.c ('k') | openssl/crypto/evp/c_all.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: openssl/crypto/evp/bio_md.c
===================================================================
--- openssl/crypto/evp/bio_md.c (revision 105093)
+++ openssl/crypto/evp/bio_md.c (working copy)
@@ -130,8 +130,8 @@
{
if (ret > 0)
{
- EVP_DigestUpdate(ctx,(unsigned char *)out,
- (unsigned int)ret);
+ if (EVP_DigestUpdate(ctx,(unsigned char *)out,
+ (unsigned int)ret)<=0) return (-1);
}
}
BIO_clear_retry_flags(b);
@@ -157,8 +157,11 @@
(unsigned int)ret);
}
}
- BIO_clear_retry_flags(b);
- BIO_copy_next_retry(b);
+ if(b->next_bio != NULL)
+ {
+ BIO_clear_retry_flags(b);
+ BIO_copy_next_retry(b);
+ }
return(ret);
}
@@ -194,6 +197,7 @@
case BIO_C_GET_MD_CTX:
pctx=ptr;
*pctx=ctx;
+ b->init = 1;
break;
case BIO_C_SET_MD_CTX:
if (b->init)
@@ -249,7 +253,9 @@
ctx=bp->ptr;
if (size < ctx->digest->md_size)
return(0);
- EVP_DigestFinal_ex(ctx,(unsigned char *)buf,&ret);
+ if (EVP_DigestFinal_ex(ctx,(unsigned char *)buf,&ret)<=0)
+ return -1;
+
return((int)ret);
}
« no previous file with comments | « openssl/crypto/evp/bio_enc.c ('k') | openssl/crypto/evp/c_all.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698