mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Userland: Fix nc by not memset()'ing the input address char*
We were accidentally calling memset() on "addr" (the input char*), not "dst_addr" (the target struct sockaddr_in), which was causing a simple "nc localhost 8000" to crash. Fixes #2908.
This commit is contained in:
parent
08c05fbbd1
commit
090c031c1a
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ int main(int argc, char** argv)
|
|||
char addr_str[100];
|
||||
|
||||
struct sockaddr_in dst_addr;
|
||||
memset(&addr, 0, sizeof(addr));
|
||||
memset(&dst_addr, 0, sizeof(dst_addr));
|
||||
|
||||
dst_addr.sin_family = AF_INET;
|
||||
dst_addr.sin_port = htons(port);
|
||||
|
|
Loading…
Add table
Reference in a new issue