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

Unified Diff: mozilla/security/nss/lib/freebl/sha512.c

Issue 10961060: Update NSS to NSS 3.14 Beta 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Add the NSS snapshot timestamp to README.chromium and nss-checkout.sh Created 8 years, 3 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 | « mozilla/security/nss/lib/freebl/sechash.h ('k') | mozilla/security/nss/lib/freebl/sha_fast.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mozilla/security/nss/lib/freebl/sha512.c
===================================================================
--- mozilla/security/nss/lib/freebl/sha512.c (revision 158129)
+++ mozilla/security/nss/lib/freebl/sha512.c (working copy)
@@ -156,8 +156,9 @@
void
SHA256_DestroyContext(SHA256Context *ctx, PRBool freeit)
{
+ memset(ctx, 0, sizeof *ctx);
if (freeit) {
- PORT_ZFree(ctx, sizeof *ctx);
+ PORT_Free(ctx);
}
}
@@ -471,6 +472,7 @@
SHA256_Begin(&ctx);
SHA256_Update(&ctx, src, src_length);
SHA256_End(&ctx, dest, &outLen, SHA256_LENGTH);
+ memset(&ctx, 0, sizeof ctx);
return SECSuccess;
}
@@ -564,6 +566,7 @@
SHA224_Begin(&ctx);
SHA256_Update(&ctx, src, src_length);
SHA256_End(&ctx, dest, &outLen, SHA224_LENGTH);
+ memset(&ctx, 0, sizeof ctx);
return SECSuccess;
}
@@ -787,8 +790,9 @@
void
SHA512_DestroyContext(SHA512Context *ctx, PRBool freeit)
{
+ memset(ctx, 0, sizeof *ctx);
if (freeit) {
- PORT_ZFree(ctx, sizeof *ctx);
+ PORT_Free(ctx);
}
}
@@ -1234,6 +1238,7 @@
SHA512_Begin(&ctx);
SHA512_Update(&ctx, src, src_length);
SHA512_End(&ctx, dest, &outLen, SHA512_LENGTH);
+ memset(&ctx, 0, sizeof ctx);
return SECSuccess;
}
@@ -1341,6 +1346,7 @@
SHA384_Begin(&ctx);
SHA512_Update(&ctx, src, src_length);
SHA512_End(&ctx, dest, &outLen, SHA384_LENGTH);
+ memset(&ctx, 0, sizeof ctx);
return SECSuccess;
}
« no previous file with comments | « mozilla/security/nss/lib/freebl/sechash.h ('k') | mozilla/security/nss/lib/freebl/sha_fast.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698