diff --git a/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp b/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp index af04bc452c4d274950a55e42f6be3ae045ce72dc..ef5615f2059f33e03618438847190cc5a8555546 100644 --- a/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp +++ b/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp @@ -825,7 +825,7 @@ XMLParsePathToFSRef_X(const XMLCh* const pathName, FSRef& ref, MemoryManager* co // If it's a relative path, pre-pend the current directory to the path. // FSPathMakeRef doesn't deal with relativity on the front of the path - if (*p != '/') + if (*p != '/' && kMaxMacStaticPathChars > pathLen) { // Right justify the user path to make room for the pre-pended path std::memmove(p + kMaxMacStaticPathChars - pathLen, p, pathLen);