Initialize the target of strcat

Was not detected until now, but immediately crashes with a recent libc.
This commit is contained in:
Marco d'Itri 2017-08-15 21:18:21 +02:00
parent 6e23999a24
commit 85c7b302a3

View File

@ -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 ");