]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Allocate LIST patterns from command pool so they don't get corrupted in long...
authorTimo Sirainen <tss@iki.fi>
Thu, 21 Feb 2013 17:58:39 +0000 (19:58 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 21 Feb 2013 17:58:39 +0000 (19:58 +0200)
src/imap/cmd-list.c

index c649cdae40646655d882c56e75a3441231164f40..ab64aa6bf1d22b0fbc4268e20e47bf6a7bff6f25 100644 (file)
@@ -1026,7 +1026,7 @@ bool cmd_list_full(struct client_command_context *cmd, bool lsub)
                                return TRUE;
                        }
                        if (imap_utf7_to_utf8(pattern, str) == 0)
-                               pattern = t_strdup(str_c(str));
+                               pattern = p_strdup(cmd->pool, str_c(str));
                        array_append(&patterns, &pattern, 1);
                        str_truncate(str, 0);
                }
@@ -1037,7 +1037,7 @@ bool cmd_list_full(struct client_command_context *cmd, bool lsub)
                        return TRUE;
                }
                if (imap_utf7_to_utf8(pattern, str) == 0)
-                       pattern = str_c(str);
+                       pattern = p_strdup(cmd->pool, str_c(str));
 
                p_array_init(&patterns, cmd->pool, 1);
                array_append(&patterns, &pattern, 1);