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

Unified Diff: nss/mozilla/security/nss/lib/pk11wrap/pk11auth.c

Issue 3135002: Update to NSS 3.12.7 and NSPR 4.8.6.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 4 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
Index: nss/mozilla/security/nss/lib/pk11wrap/pk11auth.c
===================================================================
--- nss/mozilla/security/nss/lib/pk11wrap/pk11auth.c (revision 55475)
+++ nss/mozilla/security/nss/lib/pk11wrap/pk11auth.c (working copy)
@@ -479,22 +479,18 @@
{
CK_RV crv;
SECStatus rv = SECFailure;
- int newLen;
- int oldLen;
+ int newLen = 0;
+ int oldLen = 0;
CK_SESSION_HANDLE rwsession;
/* use NULL values to trigger the protected authentication path */
- if (slot->protectedAuthPath) {
- if (newpw == NULL) newLen = 0;
- if (oldpw == NULL) oldLen = 0;
- } else {
+ if (!slot->protectedAuthPath) {
if (newpw == NULL) newpw = "";
if (oldpw == NULL) oldpw = "";
- newLen = PORT_Strlen(newpw);
- oldLen = PORT_Strlen(oldpw);
}
+ if (newpw) newLen = PORT_Strlen(newpw);
+ if (oldpw) oldLen = PORT_Strlen(oldpw);
-
/* get a rwsession */
rwsession = PK11_GetRWSession(slot);
if (rwsession == CK_INVALID_SESSION) {

Powered by Google App Engine
This is Rietveld 408576698