mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
Userland: Prefer strlcpy over strcpy in ping
This is supposed to serve as a reminder if and when someone decides to make the 'msg' field configurable.
This commit is contained in:
parent
5c1a72f0ef
commit
cb52bfdd27
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ int main(int argc, char** argv)
|
|||
ping_packet.header.code = 0;
|
||||
ping_packet.header.un.echo.id = htons(pid);
|
||||
ping_packet.header.un.echo.sequence = htons(seq++);
|
||||
strcpy(ping_packet.msg, "Hello there!\n");
|
||||
strlcpy(ping_packet.msg, "Hello there!\n", sizeof(ping_packet.msg));
|
||||
|
||||
ping_packet.header.checksum = internet_checksum(&ping_packet, sizeof(PingPacket));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue