mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
mk: replace overlapping strcpy with memmove
Found by ASAN.
This commit is contained in:
parent
8cb7308f3a
commit
154140a22b
1 changed files with 2 additions and 1 deletions
|
@ -123,7 +123,8 @@ buildenv(Job *j, int slot)
|
|||
qp = strchr(cp+1, ')');
|
||||
if(qp){
|
||||
*qp = 0;
|
||||
strcpy(w->s, cp+1);
|
||||
/* strcpy, but might overlap */
|
||||
memmove(w->s, cp+1, strlen(cp+1)+1);
|
||||
l = &w->next;
|
||||
w = w->next;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue