diff options
Diffstat (limited to 'pullreqd.c')
-rw-r--r-- | pullreqd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -114,7 +114,7 @@ int init_socket(config *cfg) { return -1; } struct addrinfo hints, *ainfo_root, *ainfo; - const size_t size = sprintf(NULL, "%d", cfg->port) + 1; + const size_t size = snprintf(NULL, 0, "%d", cfg->port) + 1; char *port_str = malloc(size); sprintf(port_str, "%d", cfg->port); |