|
@@ -422,9 +422,9 @@ static ssize_t wildcard_expandPath(const char* path, char* expanded)
|
|
|
|
|
|
if (expanded != NULL) {
|
|
|
// pathLength includes an extra '.'
|
|
|
- strncpy(dest, path, pathLength-1);
|
|
|
+ memcpy(dest, path, pathLength - 1);
|
|
|
dest += pathLength - 1;
|
|
|
- strncpy(dest, filename, filenameLength);
|
|
|
+ memcpy(dest, filename, filenameLength);
|
|
|
dest += filenameLength;
|
|
|
*dest = PATH_SEPARATOR;
|
|
|
dest++;
|
|
@@ -536,7 +536,7 @@ static ssize_t getClassPath_helper(const char *classpath, char* expandedClasspat
|
|
|
// +1 for path separator or null terminator
|
|
|
length += tokenlen + 1;
|
|
|
if (expandedCP_curr != NULL) {
|
|
|
- strncpy(expandedCP_curr, cp_token, tokenlen);
|
|
|
+ memcpy(expandedCP_curr, cp_token, tokenlen);
|
|
|
expandedCP_curr += tokenlen;
|
|
|
*expandedCP_curr = PATH_SEPARATOR;
|
|
|
expandedCP_curr++;
|