From e0e810372da4d28b62ec52a55ef0585abfc9e951 Mon Sep 17 00:00:00 2001 From: beber Date: Fri, 2 Dec 2005 17:42:57 +0000 Subject: Dude ! alloc memory --- src/espik.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/espik.c') diff --git a/src/espik.c b/src/espik.c index beba783..853eb48 100644 --- a/src/espik.c +++ b/src/espik.c @@ -110,6 +110,9 @@ int main (int argc, char **argv) char *tmp, *tmp2; + tmp = malloc (sizeof(char)* (strlen("NICK ") + strlen (a_infos.client->nickname))); + tmp2 = malloc (sizeof(char)* (strlen("USER localhost:") + strlen(a_infos.client->nickname)*2 + strlen (a_infos.client->realname))); + sprintf (tmp, "NICK %s", a_infos.client->nickname); sprintf (tmp2, "USER %s %s localhost: %s", a_infos.client->nickname, a_infos.client->nickname, a_infos.client->realname); -- cgit v1.2.3