Realloc correct size when receiving admin privmsg.

This commit is contained in:
Arnaud Cornet 2008-01-06 00:25:56 +01:00
parent c5d1f537e4
commit 20129da225
1 changed files with 1 additions and 1 deletions

View File

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