From b7a4d2c3f47f9d5fb15b2a2764ed40277fb26991 Mon Sep 17 00:00:00 2001 From: Adam Brady Date: Tue, 28 Mar 2017 12:40:58 +1100 Subject: [PATCH] 2.0.0 --- NSPR/NSPR_modified.txt | 89 ------------------- NSPR/lib/ds/plarena.h | 2 +- NSPR/lib/libc/src/strdup.c | 6 +- NSS/NSS_modified.txt | 38 -------- .../libpkix/pkix_pl_nss/pki/pkix_pl_date.c | 4 + .../pkix_pl_nss/pki/pkix_pl_generalname.c | 16 ++-- 6 files changed, 17 insertions(+), 138 deletions(-) delete mode 100755 NSPR/NSPR_modified.txt delete mode 100755 NSS/NSS_modified.txt diff --git a/NSPR/NSPR_modified.txt b/NSPR/NSPR_modified.txt deleted file mode 100755 index ef2dc9678..000000000 --- a/NSPR/NSPR_modified.txt +++ /dev/null @@ -1,89 +0,0 @@ -NSPR/pr/include/md/prosdep.h -NSPR/pr/include/private/pprio.h -NSPR/pr/include/private/primpl.h -NSPR/pr/include/pratom.h -NSPR/pr/include/prbit.h -NSPR/pr/include/prinet.h -NSPR/pr/include/prio.h -NSPR/pr/include/prlong.h -NSPR/pr/include/prtypes.h -NSPR/pr/src/io/prfile.c -NSPR/pr/src/io/prio.c -NSPR/pr/src/io/priometh.c -NSPR/pr/src/io/prlog.c -NSPR/pr/src/io/prmapopt.c -NSPR/pr/src/linking/prlink.c -NSPR/pr/src/md/prosdep.c -NSPR/pr/src/memory/prshma.c -NSPR/pr/src/misc/prdtoa.c -NSPR/pr/src/misc/prnetdb.c -NSPR/pr/src/misc/prsystem.c -NSPR/pr/src/misc/prtime.c -NSPR/pr/src/threads/combined/pruthr.c -NSPR/pr/tests/addrstr.c -NSPR/pr/tests/affinity.c: -NSPR/pr/tests/append.c -NSPR/pr/tests/atomic.c -NSPR/pr/tests/cleanup.c -NSPR/pr/tests/cltsrv.c -NSPR/pr/tests/concur.c -NSPR/pr/tests/cvar.c -NSPR/pr/tests/cvar2.c -NSPR/pr/tests/dtoa.c -NSPR/pr/tests/env.c -NSPR/pr/tests/errcodes.c -NSPR/pr/tests/errset.c -NSPR/pr/tests/exit.c -NSPR/pr/tests/formattm.c -NSPR/pr/tests/gethost.c -NSPR/pr/tests/getproto.c -NSPR/pr/tests/i2l.c -NSPR/pr/tests/initclk.c -NSPR/pr/tests/inrval.c -NSPR/pr/tests/intrio.c -NSPR/pr/tests/intrupt.c -NSPR/pr/tests/io_timeout.c -NSPR/pr/tests/join.c -NSPR/pr/tests/layer.c -NSPR/pr/tests/lazyinit.c -NSPR/pr/tests/lltest.c -NSPR/pr/tests/lock.c -NSPR/pr/tests/many_cv.c -NSPR/pr/tests/monref.c -NSPR/pr/tests/nblayer.c -NSPR/pr/tests/nonblock.c -NSPR/pr/tests/ntoh.c -NSPR/pr/tests/obsints.c -NSPR/pr/tests/parsetm.c -NSPR/pr/tests/poll_er.c -NSPR/pr/tests/poll_nm.c -NSPR/pr/tests/poll_to.c -NSPR/pr/tests/pollable.c -NSPR/pr/tests/priotest.c -NSPR/pr/tests/randseed.c -NSPR/pr/tests/reinit.c -NSPR/pr/tests/rwlockrank.c -NSPR/pr/tests/rwlocktest.c -NSPR/pr/tests/selct_er.c -NSPR/pr/tests/selct_nm.c -NSPR/pr/tests/selct_to.c -NSPR/pr/tests/sem.c -NSPR/pr/tests/server_test.c -NSPR/pr/tests/short_thread.c -NSPR/pr/tests/socket.c -NSPR/pr/tests/sockopt.c -NSPR/pr/tests/sprintf.c -NSPR/pr/tests/stack.c -NSPR/pr/tests/str2addr.c -NSPR/pr/tests/strod.c -NSPR/pr/tests/switch.c -NSPR/pr/tests/system.c -NSPR/pr/tests/testbit.c -NSPR/pr/tests/threads.c -NSPR/pr/tests/timemac.c -NSPR/pr/tests/timetest.c -NSPR/pr/tests/tpd.c -NSPR/pr/tests/udpsrv.c -NSPR/pr/tests/vercheck.c -NSPR/pr/tests/version.c -NSPR/pr/tests/writev.c diff --git a/NSPR/lib/ds/plarena.h b/NSPR/lib/ds/plarena.h index 2673a2ae1..c34d44404 100755 --- a/NSPR/lib/ds/plarena.h +++ b/NSPR/lib/ds/plarena.h @@ -221,7 +221,7 @@ PR_IMPORT(void) __asan_unpoison_memory_region(void const volatile *addr, size_t if ((pool)->current == (a)) (pool)->current = &(pool)->first; \ *(pnext) = (a)->next; \ PL_CLEAR_ARENA(a); \ - free(a); \ + PR_Free(a); \ (a) = 0; \ PR_END_MACRO diff --git a/NSPR/lib/libc/src/strdup.c b/NSPR/lib/libc/src/strdup.c index c267147ce..4a17b06d6 100755 --- a/NSPR/lib/libc/src/strdup.c +++ b/NSPR/lib/libc/src/strdup.c @@ -18,7 +18,7 @@ PL_strdup(const char *s) n = strlen(s) + 1; - rv = (char *)malloc(n); + rv = (char *)PR_MALLOC(n); if( (char *)0 == rv ) return rv; (void)memcpy(rv, s, n); @@ -29,7 +29,7 @@ PL_strdup(const char *s) PR_IMPLEMENT(void) PL_strfree(char *s) { - free(s); + PR_Free(s); } PR_IMPLEMENT(char *) @@ -43,7 +43,7 @@ PL_strndup(const char *s, PRUint32 max) l = PL_strnlen(s, max); - rv = (char *)malloc(l+1); + rv = (char *)PR_MALLOC(l+1); if( (char *)0 == rv ) return rv; (void)memcpy(rv, s, l); diff --git a/NSS/NSS_modified.txt b/NSS/NSS_modified.txt deleted file mode 100755 index b8a67ebc9..000000000 --- a/NSS/NSS_modified.txt +++ /dev/null @@ -1,38 +0,0 @@ -NSS/cmd/bltest/blapitest.c -NSS/cmd/certutil/certext.c -NSS/cmd/certutil/certutil.c -NSS/cmd/certutil/keystuff.c -NSS/cmd/lib/basicutil.h -NSS/cmd/lib/secpwd.c -NSS/cmd/lib/secutil.c -NSS/cmd/lib/secutil.h -NSS/cmd/modutil/install.c -NSS/cmd/modutil/instsec.c -NSS/cmd/modutil/modutil.c -NSS/cmd/pk11gcmtest/pk11gcmtest.c -NSS/lib/ckfw/builtins/certdata.c -NSS/lib/ckfw/builtins/ckbi_slt.h -NSS/lib/ckfw/nssck.api -NSS/lib/dev/ckhelper.c -NSS/lib/freebl/mpi/mpi.c -NSS/lib/freebl/arcfour.c -NSS/lib/freebl/ctr.c -NSS/lib/freebl/gcm.c -NSS/lib/freebl/flipsfreebl.c -NSS/lib/freebl/loader.c -NSS/lib/freebl/sha_fast.c -NSS/lib/freebl/shvfy.c -NSS/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c -NSS/lib/libpkix/pkix_pl_nss/util/pkix_tools.h -NSS/lib/nss/nssinit.c -NSS/lib/nss/nss_slt.h -NSS/lib/pk11wrap/pk11load.c -NSS/lib/softoken/pkcs11.c -NSS/lib/softoken/sdb.c -NSS/lib/softoken/softoken.h -NSS/lib/sqlite/sqlite3.c -NSS/lib/ssl/sslmutex.c -NSS/lib/ssl/sslnonce.c -NSS/lib/ssl/sslsnce.c -NSS/lib/ssl/ssltrace.c -NSS/lib/util/secport.h diff --git a/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c b/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c index 4b5016bd0..75462e2fe 100755 --- a/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c +++ b/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c @@ -433,7 +433,11 @@ PKIX_PL_Date_Create_CurrentOffBySeconds( PKIX_ENTER(DATE, "PKIX_PL_Date_Create_CurrentOffBySeconds"); PKIX_NULLCHECK_ONE(pDate); +#ifdef NN_NINTENDO_SDK + time = PR_Now() + ((PRTime)secondsOffset * 1000000); +#else time = PR_Now() + PR_SecondsToInterval(secondsOffset); +#endif /* NN_NINTENDO_SDK */ /* create a PKIX_PL_Date object */ PKIX_CHECK(PKIX_PL_Object_Alloc (PKIX_DATE_TYPE, diff --git a/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c b/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c index 9e9a74c78..c33332de4 100755 --- a/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c +++ b/NSS/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c @@ -222,6 +222,15 @@ pkix_pl_GeneralName_Create( nameType = nssAltName->type; + /* initialize fields */ + genName->type = nameType; + genName->nssGeneralNameList = NULL; + genName->directoryName = NULL; + genName->OthName = NULL; + genName->other = NULL; + genName->oid = NULL; + + /* * We use CERT_CreateGeneralNameList to create just one CERTGeneralName * item for memory allocation reason. If we want to just create one @@ -246,13 +255,6 @@ pkix_pl_GeneralName_Create( genName->nssGeneralNameList = nssGenNameList; - /* initialize fields */ - genName->type = nameType; - genName->directoryName = NULL; - genName->OthName = NULL; - genName->other = NULL; - genName->oid = NULL; - switch (nameType){ case certOtherName: