From fa222fcfed9856832eb86a3cbaae7a044ff6142b Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sat, 28 Sep 2013 18:42:48 +0200 Subject: [PATCH] set the type of the pointer into sizeof, so its definitely the right --- citadel/modules/imap/serv_imap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/citadel/modules/imap/serv_imap.c b/citadel/modules/imap/serv_imap.c index a7b80d989..55a80e8b0 100644 --- a/citadel/modules/imap/serv_imap.c +++ b/citadel/modules/imap/serv_imap.c @@ -293,7 +293,7 @@ void imap_add_single_msgid(long msgnum, void *userdata) if (Imap->num_msgs > Imap->num_alloc) { Imap->num_alloc += REALLOC_INCREMENT; Imap->msgids = realloc(Imap->msgids, (Imap->num_alloc * sizeof(long)) ); - Imap->flags = realloc(Imap->flags, (Imap->num_alloc * sizeof(long)) ); + Imap->flags = realloc(Imap->flags, (Imap->num_alloc * sizeof(unsigned int *)) ); } Imap->msgids[Imap->num_msgs - 1] = msgnum; Imap->flags[Imap->num_msgs - 1] = 0; @@ -328,7 +328,7 @@ void imap_load_msgids(void) } if (Imap->num_msgs) { - Imap->flags = malloc(Imap->num_alloc * sizeof(long)); + Imap->flags = malloc(Imap->num_alloc * sizeof(unsigned int *)); memset(Imap->flags, 0, (Imap->num_alloc * sizeof(long)) ); } -- 2.30.2