* extract_token() now expects to be supplied with the size of the
[citadel.git] / citadel / imap_misc.c
index c26ee32c2192427dc93bc264a2bb3a4a5203c6ec..0ddd8d401ea553310776285422f834fdc8843f19 100644 (file)
@@ -224,7 +224,7 @@ void imap_do_append_flags(long new_msgnum, char *new_message_flags) {
        safestrncpy(flags, new_message_flags, sizeof flags);
 
        for (i=0; i<num_tokens(flags, ' '); ++i) {
-               extract_token(this_flag, flags, i, ' ');
+               extract_token(this_flag, flags, i, ' ', sizeof this_flag);
                if (this_flag[0] == '\\') strcpy(this_flag, &this_flag[1]);
                if (!strcasecmp(this_flag, "Seen")) {
                        CtdlSetSeen(new_msgnum, 1, ctdlsetseen_seen);