summaryrefslogtreecommitdiff
path: root/security/nss/lib/fortcrypt
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-05-01 00:06:39 +0000
committerwtc%netscape.com <devnull@localhost>2002-05-01 00:06:39 +0000
commite23f0cc1fb3ec79374a9fe8f4d475f12d0838550 (patch)
tree6b412db6adbfc3b98d47398e8bf62ec4d6d600d7 /security/nss/lib/fortcrypt
parent429ff2e354eb9e5a96987f535695fa60253192d1 (diff)
downloadnss-hg-e23f0cc1fb3ec79374a9fe8f4d475f12d0838550.tar.gz
Bugzilla bug 131057: define PORT_Strdup as a function that calls PORT_Alloc.
Modified files: lib/ckfw/nsprstub.c lib/fortcrypt/swfort/pkcs11/stub.c lib/nss/nss.def lib/util/secport.c lib/util/secport.h
Diffstat (limited to 'security/nss/lib/fortcrypt')
-rw-r--r--security/nss/lib/fortcrypt/swfort/pkcs11/stub.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/security/nss/lib/fortcrypt/swfort/pkcs11/stub.c b/security/nss/lib/fortcrypt/swfort/pkcs11/stub.c
index e3b854f3d..0f673e77b 100644
--- a/security/nss/lib/fortcrypt/swfort/pkcs11/stub.c
+++ b/security/nss/lib/fortcrypt/swfort/pkcs11/stub.c
@@ -115,6 +115,19 @@ PORT_ZFree(void *ptr, size_t len)
}
}
+char *
+PORT_Strdup(const char *str)
+{
+ size_t len = PORT_Strlen(str)+1;
+ char *newstr;
+
+ newstr = (char *)PORT_Alloc(len);
+ if (newstr) {
+ PORT_Memcpy(newstr, str, len);
+ }
+ return newstr;
+}
+
void
PORT_SetError(int value)
{
@@ -210,7 +223,7 @@ PORT_ArenaUnmark(PLArenaPool *arena, void *mark)
}
char *
-PORT_ArenaStrdup(PLArenaPool *arena,char *str) {
+PORT_ArenaStrdup(PLArenaPool *arena,const char *str) {
int len = PORT_Strlen(str)+1;
char *newstr;