set the type of the pointer into sizeof, so its definitely the right
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 28 Sep 2013 16:42:48 +0000 (18:42 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 28 Sep 2013 16:42:48 +0000 (18:42 +0200)
citadel/modules/imap/serv_imap.c

index a7b80d989b3c7b9e94e254adff87c002a273673a..55a80e8b0241f82f0aff512920a8c999e3855bba 100644 (file)
@@ -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)) );
        }