From c81b37e580d6c83c8b97a9a111c4cfb8dc6baf28 Mon Sep 17 00:00:00 2001 From: sin Date: Tue, 7 Oct 2014 02:13:11 +0100 Subject: Allocate enough memory to allow copying all the friends --- ratox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ratox.c') diff --git a/ratox.c b/ratox.c index 74a2a41..999739b 100644 --- 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:"); -- cgit v1.2.3