From 584891891e06fbc2c2ded7cc0bf11c6ff0624368 Mon Sep 17 00:00:00 2001 From: "thom%netscape.com" Date: Fri, 28 Aug 1998 01:33:14 +0000 Subject: [PATCH] fixed heap corruption in mac version of the function mangleResourceIntoFileURL. This change ONLY effects macs --- network/module/nsURL.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/network/module/nsURL.cpp b/network/module/nsURL.cpp index 3cabd1529472..1b993a689b3e 100644 --- a/network/module/nsURL.cpp +++ b/network/module/nsURL.cpp @@ -749,6 +749,13 @@ char *mangleResourceIntoFileURL(const char* aResourceFileName) printf("RESOURCE name %s\n", resourceBase); #endif +#ifdef XP_MAC +#define MAXPATHLEN 2000 + + resourceBase = (char *)PR_Malloc(MAXPATHLEN);; + *resourceBase = '\0'; +#endif + // Join base path to resource name if (aResourceFileName[0] == '/') { aResourceFileName++;