diff -Nru nss-3.13.1.with.ckbi.1.88/debian/changelog nss-3.13.1.with.ckbi.1.88/debian/changelog --- nss-3.13.1.with.ckbi.1.88/debian/changelog 2012-02-19 13:21:57.000000000 +0000 +++ nss-3.13.1.with.ckbi.1.88/debian/changelog 2012-03-07 15:39:17.000000000 +0000 @@ -1,3 +1,9 @@ +nss (3.13.1.with.ckbi.1.88-1ubuntu6) precise; urgency=low + + * Add protect-against-calls-before-nss_init.patch (RHBZ #784672). + + -- Timo Aaltonen Mon, 27 Feb 2012 14:45:29 +0200 + nss (3.13.1.with.ckbi.1.88-1ubuntu5) precise; urgency=low * Include libnssckfw.a in the -dev package, also needed by diff -Nru nss-3.13.1.with.ckbi.1.88/debian/patches/protect-against-calls-before-nss_init.patch nss-3.13.1.with.ckbi.1.88/debian/patches/protect-against-calls-before-nss_init.patch --- nss-3.13.1.with.ckbi.1.88/debian/patches/protect-against-calls-before-nss_init.patch 1970-01-01 00:00:00.000000000 +0000 +++ nss-3.13.1.with.ckbi.1.88/debian/patches/protect-against-calls-before-nss_init.patch 2012-02-27 12:45:18.000000000 +0000 @@ -0,0 +1,40 @@ +diff -up mozilla/security/nss/lib/nss/nssinit.c.784672 mozilla/security/nss/lib/nss/nssinit.c +--- a/mozilla/security/nss/lib/nss/nssinit.c.784672 2012-01-26 14:43:46.232357231 -0800 ++++ b/mozilla/security/nss/lib/nss/nssinit.c 2012-01-26 14:50:55.830512565 -0800 +@@ -944,6 +944,12 @@ NSS_RegisterShutdown(NSS_ShutdownFunc sF + { + int i; + ++ /* make sure our lock and condition variable are initialized one and only ++ * one time */ ++ if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) { ++ return SECFailure; ++ } ++ + PZ_Lock(nssInitLock); + if (!NSS_IsInitialized()) { + PZ_Unlock(nssInitLock); +@@ -1002,6 +1008,11 @@ NSS_UnregisterShutdown(NSS_ShutdownFunc + { + int i; + ++ /* make sure our lock and condition variable are initialized one and only ++ * one time */ ++ if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) { ++ return SECFailure; ++ } + PZ_Lock(nssInitLock); + if (!NSS_IsInitialized()) { + PZ_Unlock(nssInitLock); +@@ -1192,6 +1203,11 @@ NSS_ShutdownContext(NSSInitContext *cont + { + SECStatus rv = SECSuccess; + ++ /* make sure our lock and condition variable are initialized one and only ++ * one time */ ++ if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) { ++ return SECFailure; ++ } + PZ_Lock(nssInitLock); + /* If one or more threads are in the middle of init, wait for them + * to complete */ diff -Nru nss-3.13.1.with.ckbi.1.88/debian/patches/series nss-3.13.1.with.ckbi.1.88/debian/patches/series --- nss-3.13.1.with.ckbi.1.88/debian/patches/series 2012-01-12 11:15:21.000000000 +0000 +++ nss-3.13.1.with.ckbi.1.88/debian/patches/series 2012-02-27 12:44:40.000000000 +0000 @@ -10,3 +10,4 @@ 97_SSL_RENEGOTIATE_TRANSITIONAL.patch lower-dhe-priority.patch 98_fix_header_error.patch +protect-against-calls-before-nss_init.patch