Realloc correct size when receiving admin privmsg.
This commit is contained in:
parent
c5d1f537e4
commit
20129da225
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user