diff options
author | shennetsind <ind@henn.et> | 2015-01-17 17:43:18 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-01-17 17:43:18 -0200 |
commit | 348044f12d5f683c8945e0eac642f2795050fb4e (patch) | |
tree | 0f481175cd4d4056ef0859c637a3b0c2df159854 /src/common/socket.c | |
parent | f0ea100d5ccc03d8f94b67ea9d3ffa82fcd937b1 (diff) | |
download | hercules-348044f12d5f683c8945e0eac642f2795050fb4e.tar.gz hercules-348044f12d5f683c8945e0eac642f2795050fb4e.tar.bz2 hercules-348044f12d5f683c8945e0eac642f2795050fb4e.tar.xz hercules-348044f12d5f683c8945e0eac642f2795050fb4e.zip |
Another ~10 Fixes
Addressing out of bounds read/write, resource leaks.
Special Thanks to 4144 and Haruna!
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/common/socket.c')
-rw-r--r-- | src/common/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index 2ab37109c..9c1f35eee 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -505,7 +505,7 @@ int connect_client(int listen_fd) { int make_listen_bind(uint32 ip, uint16 port) { - struct sockaddr_in server_address; + struct sockaddr_in server_address = { 0 }; int fd; int result; @@ -555,7 +555,7 @@ int make_listen_bind(uint32 ip, uint16 port) } int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { - struct sockaddr_in remote_address; + struct sockaddr_in remote_address = { 0 }; int fd; int result; |