commit c81b37e580d6c83c8b97a9a111c4cfb8dc6baf28 parent 4292294e0cc7f68c5272faf4eeff190fd810987c Author: sin <sin@2f30.org> Date: Tue, 7 Oct 2014 02:13:11 +0100 Allocate enough memory to allow copying all the friends Diffstat:
M | ratox.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ratox.c b/ratox.c @@ -1377,7 +1377,7 @@ friendload(void) uint32_t i; sz = tox_count_friendlist(tox); - frnums = malloc(sz); + frnums = malloc(sz * sizeof(*frnums)); if (!frnums) eprintf("malloc:");