blob: 0d94674ce5a3105850dd27c29da51f6bd877813c [file] [log] [blame]
--- a/ping.c
+++ b/ping.c
@@ -813,7 +813,7 @@
int rv;
buf = malloc(len*sizeof(char));
- memset(buf, 0, sizeof(buf));
+ memset(buf, 0, len*sizeof(char));
while (1) {
rv = gethostbyname_r(hostname, &result_buf, buf, len,