From 85c7b302a3dc884c0437883c73f037b7263d882b Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Tue, 15 Aug 2017 21:18:21 +0200 Subject: [PATCH] Initialize the target of strcat Was not detected until now, but immediately crashes with a recent libc. --- whois.c | 1 + 1 file changed, 1 insertion(+) diff --git a/whois.c b/whois.c index 7c2860f..75eeca8 100644 --- a/whois.c +++ b/whois.c @@ -818,6 +818,7 @@ char *query_crsnic(const int sock, const char *query) int state = 0; temp = malloc(strlen("domain ") + strlen(query) + 2 + 1); + *temp = '\0'; if (!strpbrk(query, "=~ ")) strcpy(temp, "domain ");