ecere/String: Fixed another instance of potential memory overlap with strncpy in...
authorJerome St-Louis <jerome@ecere.com>
Sat, 26 May 2012 21:40:40 +0000 (17:40 -0400)
committerJerome St-Louis <jerome@ecere.com>
Sat, 26 May 2012 21:40:40 +0000 (17:40 -0400)
ecere/src/com/String.ec

index cd51949..eeae238 100644 (file)
@@ -79,7 +79,7 @@ public char * StripLastDirectory(char * string, char * output)
 
       if((runtimePlatform == win32) ? (c >= 0) : (c > 0))
       {
-         strncpy(output, string, c);
+         memmove(output, string, c);
          if(c > 0)
          {
             if(runtimePlatform == win32 && c == 1 && output[0] == '\\' && output[1] == '\\')