summaryrefslogtreecommitdiff
path: root/dmake/dag.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmake/dag.c')
-rw-r--r--dmake/dag.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/dmake/dag.c b/dmake/dag.c
index ab5f7d9400c7..c10c12c18f1e 100644
--- a/dmake/dag.c
+++ b/dmake/dag.c
@@ -369,14 +369,17 @@ int flags; /* initial ht_flags */
/* strip out any \<nl> combinations where \ is the current
* CONTINUATION char */
for(p=q; (p=strchr(p,CONTINUATION_CHAR))!=NIL(char); )
- if( p[1] == '\n' )
- strcpy( p, p+2 );
+ if( p[1] == '\n' ) {
+ size_t len = strlen(p+2)+1;
+ memmove ( p, p+2, len );
+ }
else
p++;
p = DmStrSpn(q ," \t"); /* Strip white space before ... */
if( p != q ) {
- strcpy( q, p);
+ size_t len = strlen(p)+1;
+ memmove( q, p, len );
p = q;
}