mirror of
https://github.com/darkk/redsocks.git
synced 2025-08-30 13:45:30 +00:00
Fix transposition of memset parameters.
This commit is contained in:
parent
709646d59d
commit
b60b492602
2
utils.c
2
utils.c
@ -222,7 +222,7 @@ char *red_inet_ntop(const struct sockaddr_in* sa, char* buffer, size_t buffer_si
|
|||||||
|
|
||||||
assert(buffer_size >= sizeof(placeholder));
|
assert(buffer_size >= sizeof(placeholder));
|
||||||
|
|
||||||
memset(buffer, buffer_size, 0);
|
memset(buffer, 0, buffer_size);
|
||||||
if (sa->sin_family == AF_INET) {
|
if (sa->sin_family == AF_INET) {
|
||||||
retval = inet_ntop(AF_INET, &sa->sin_addr, buffer, buffer_size);
|
retval = inet_ntop(AF_INET, &sa->sin_addr, buffer, buffer_size);
|
||||||
port = ((struct sockaddr_in*)sa)->sin_port;
|
port = ((struct sockaddr_in*)sa)->sin_port;
|
||||||
|
Loading…
Reference in New Issue
Block a user