From 20129da225d1355cb08fbb929280921893b73795 Mon Sep 17 00:00:00 2001 From: Arnaud Cornet Date: Sun, 6 Jan 2008 00:25:56 +0100 Subject: [PATCH] Realloc correct size when receiving admin privmsg. --- src/bip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bip.c b/src/bip.c index a3537aa..a8d638e 100644 --- a/src/bip.c +++ b/src/bip.c @@ -2019,7 +2019,7 @@ int adm_bip(bip_t *bip, struct link_client *ic, struct line *line, continue; } line->elemv = realloc(line->elemv, - line->elemc * sizeof(char *)); + (line->elemc + 1) * sizeof(char *)); line->elemv[line->elemc] = malloc(slen + 1); memcpy(line->elemv[line->elemc], ptr, slen); line->elemv[line->elemc][slen] = 0;