mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bugzilla Bug 326168: fixed an allocation size bug. The patch is
contributed by neil@parkwaycc.co.uk. r=wtc.
This commit is contained in:
parent
00757ea341
commit
ebb4a334e0
@ -835,7 +835,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();
|
||||
|
Loading…
Reference in New Issue
Block a user