dovecot-2.0: doveadm import: Fixed potential memory corruption.

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 28 19:20:02 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/2ab52f478b72
changeset: 12628:2ab52f478b72
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 28 19:20:00 2011 +0200
description:
doveadm import: Fixed potential memory corruption.

diffstat:

 src/doveadm/doveadm-mail-import.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (23 lines):

diff -r 60daca1d28c7 -r 2ab52f478b72 src/doveadm/doveadm-mail-import.c
--- a/src/doveadm/doveadm-mail-import.c	Mon Feb 28 18:57:21 2011 +0200
+++ b/src/doveadm/doveadm-mail-import.c	Mon Feb 28 19:20:00 2011 +0200
@@ -192,13 +192,13 @@
 
 static struct doveadm_mail_cmd_context *cmd_import_alloc(void)
 {
-	struct doveadm_mail_cmd_context *ctx;
+	struct import_cmd_context *ctx;
 
-	ctx = doveadm_mail_cmd_alloc(struct doveadm_mail_cmd_context);
-	ctx->v.init = cmd_import_init;
-	ctx->v.deinit = cmd_import_deinit;
-	ctx->v.run = cmd_import_run;
-	return ctx;
+	ctx = doveadm_mail_cmd_alloc(struct import_cmd_context);
+	ctx->ctx.v.init = cmd_import_init;
+	ctx->ctx.v.deinit = cmd_import_deinit;
+	ctx->ctx.v.run = cmd_import_run;
+	return &ctx->ctx;
 }
 
 struct doveadm_mail_cmd cmd_import = {


More information about the dovecot-cvs mailing list