In Msg_banList_create(), transform
Memory_safeMalloc(1, sizeof(foo) * many)
to
Memory_safeMalloc(many, sizeof(foo))
to actually make use of Memory_safeMalloc()'s overflow detection.
msg->payload.banList = Memory_safeCalloc(1, sizeof(MumbleProto__BanList));
mumble_proto__ban_list__init(msg->payload.banList);
msg->payload.banList->n_bans = n_bans;
- msg->payload.banList->bans = Memory_safeMalloc(1, sizeof(MumbleProto__BanList__BanEntry *) * n_bans);
+ msg->payload.banList->bans = Memory_safeMalloc(n_bans, sizeof(MumbleProto__BanList__BanEntry *));
for (i = 0; i < n_bans; i++) {
msg->payload.banList->bans[i] = Memory_safeCalloc(1, sizeof(MumbleProto__BanList__BanEntry));
mumble_proto__ban_list__ban_entry__init(msg->payload.banList->bans[i]);