mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:03:35 +03:00
overlapping memory chunks with strcpy(), detected by the friendly valgrind
This commit is contained in:
parent
ba12c5deda
commit
1cdc66d927
1 changed files with 2 additions and 1 deletions
|
|
@ -2035,7 +2035,8 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
|||
used truly as a separator */
|
||||
ptr++;
|
||||
|
||||
strcpy(conn->path, ptr);
|
||||
/* This cannot be made with strcpy, as the memory chunks overlap! */
|
||||
memmove(conn->path, ptr, strlen(ptr)+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue