summaryrefslogtreecommitdiff
path: root/ratox.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-10-07 02:13:11 +0100
committersin <sin@2f30.org>2014-10-07 02:13:11 +0100
commitc81b37e580d6c83c8b97a9a111c4cfb8dc6baf28 (patch)
tree900e08037ad837ce8bfac9ccd3232da791279325 /ratox.c
parent4292294e0cc7f68c5272faf4eeff190fd810987c (diff)
Allocate enough memory to allow copying all the friends
Diffstat (limited to 'ratox.c')
-rw-r--r--ratox.c2
1 files changed, 1 insertions, 1 deletions
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:");