diff options
author | wtc%netscape.com <devnull@localhost> | 2002-03-15 23:05:58 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-03-15 23:05:58 +0000 |
commit | d59232aaf702bc1bff0fbe61e0d37846a7d5b247 (patch) | |
tree | 1b13129c60663df64a21e5c360c27d10ecc82d50 | |
parent | b486edadc1633cb971b06aaaece4ab55885c66f5 (diff) | |
download | nss-hg-d59232aaf702bc1bff0fbe61e0d37846a7d5b247.tar.gz |
Bugzilla bug 131289: fixed a UMR error and bad placement of the terminating
null byte of a string in nss_FindExternalRoot. r=mcgreer.
-rw-r--r-- | security/nss/lib/nss/nssinit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/security/nss/lib/nss/nssinit.c b/security/nss/lib/nss/nssinit.c index f85cb78b7..1389867fe 100644 --- a/security/nss/lib/nss/nssinit.c +++ b/security/nss/lib/nss/nssinit.c @@ -288,11 +288,10 @@ nss_FindExternalRoot(const char *dbpath) /* back up to the top of the directory */ PORT_Memcpy(path,dbpath,path_len); - if (path[path_len] != FILE_SEP) { + if (path[path_len-1] != FILE_SEP) { path[path_len++] = FILE_SEP; } - PORT_Memcpy(&path[path_len],dllname,PORT_Strlen(dllname)); - path[len-1] = '\0'; + PORT_Strcpy(&path[path_len],dllname); (void) SECMOD_AddNewModule("Root Certs",path, 0, 0); PORT_Free(path); return; |