X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=client.c;h=66f982c0f5010525dfb5dfcfb19fe82c7552e17d;hp=5725fd12d87c38b8bef91daafe1afaf96265753d;hb=829c31b5c14ac8f8a39a0e5cf8ef4fe71856bb48;hpb=323255cc22693c927067a1bd5219c09b3ee4dd10 diff --git a/client.c b/client.c index 5725fd12..66f982c0 100644 --- a/client.c +++ b/client.c @@ -620,8 +620,9 @@ static int __fio_client_send_remote_ini(struct fio_client *client, dprint(FD_NET, "send remote ini %s to %s\n", filename, client->hostname); - p_size = sizeof(*pdu) + strlen(filename); + p_size = sizeof(*pdu) + strlen(filename) + 1; pdu = malloc(p_size); + memset(pdu, 0, p_size); pdu->name_len = strlen(filename); strcpy((char *) pdu->file, filename); pdu->client_type = cpu_to_le16((uint16_t) client->type);