summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2006-04-12 00:35:36 +0000
committerwtchang%redhat.com <devnull@localhost>2006-04-12 00:35:36 +0000
commitaa8ee62b1dc430c5cb94d97037dcb9db9acb2bdd (patch)
treebbdadd22cb1f6bba5984c55127c291a557f89ebd
parent07fe3b968cbc104861c3af9dd8df6353db4aa8c0 (diff)
downloadnspr-hg-aa8ee62b1dc430c5cb94d97037dcb9db9acb2bdd.tar.gz
Bugzilla Bug 326168: fixed an allocation size bug. The patch is
contributed by neil@parkwaycc.co.uk. r=wtc. Tag: NSPR_4_6_BRANCH
-rw-r--r--pr/src/linking/prlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c
index 884983e6..51bff2b8 100644
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -827,7 +827,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
} else {
int wlen = MultiByteToWideChar(CP_ACP, 0, name, -1, NULL, 0);
if (wlen > MAX_PATH)
- wname = wname_malloc = PR_Malloc(wlen);
+ wname = wname_malloc = PR_Malloc(wlen * sizeof(PRUnichar));
if (wname == NULL ||
!MultiByteToWideChar(CP_ACP, 0, name, -1, wname, wlen)) {
oserr = _MD_ERRNO();