Skip to content

Commit

Permalink
Use proper buffer size in assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
darkk committed Mar 17, 2016
1 parent 91a5b80 commit d70227e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ char *red_inet_ntop(const struct sockaddr_in* sa, char* buffer, size_t buffer_si
uint16_t port;
const char placeholder[] = "???:???";

assert(buffer_size >= sizeof(placeholder));
assert(buffer_size >= RED_INET_ADDRSTRLEN);

memset(buffer, 0, buffer_size);
if (sa->sin_family == AF_INET) {
Expand Down

0 comments on commit d70227e

Please sign in to comment.