Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dee3d2b
)
ecere/String: Fixed another instance of potential memory overlap with strncpy in...
author
Jerome St-Louis
<jerome@ecere.com>
Sat, 26 May 2012 21:40:40 +0000
(17:40 -0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Sat, 26 May 2012 21:40:40 +0000
(17:40 -0400)
ecere/src/com/String.ec
patch
|
blob
|
history
diff --git
a/ecere/src/com/String.ec
b/ecere/src/com/String.ec
index
cd51949
..
eeae238
100644
(file)
--- a/
ecere/src/com/String.ec
+++ b/
ecere/src/com/String.ec
@@
-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] == '\\')