Commit 96cc3e57 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by David S. Miller

[IPV4]: ipconfig should use memmove() instead of strcpy()

strcpy is undefined if src and dest overlap.  That's clearly possible
here with a sufficiently deep path on the server.  Use memmove instead.
Signed-off-by: default avatarMatthew Wilcox <matthew@wil.cx>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5ac05a98
......@@ -1232,7 +1232,7 @@ u32 __init root_nfs_parse_addr(char *name)
if (*cp == ':')
*cp++ = '\0';
addr = in_aton(name);
strcpy(name, cp);
memmove(name, cp, strlen(cp) + 1);
} else
addr = INADDR_NONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment