dovecot-2.1: imapc: Fixed crash on saving/copying if remote IMAP...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 25 19:40:32 EEST 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/20703dbd1168
changeset: 14578:20703dbd1168
user: Timo Sirainen <tss at iki.fi>
date: Mon Jun 25 19:40:24 2012 +0300
description:
imapc: Fixed crash on saving/copying if remote IMAP server didn't support UIDPLUS.
diffstat:
src/lib-storage/index/imapc/imapc-save.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r edb8d177bd37 -r 20703dbd1168 src/lib-storage/index/imapc/imapc-save.c
--- a/src/lib-storage/index/imapc/imapc-save.c Mon Jun 25 00:18:31 2012 +0300
+++ b/src/lib-storage/index/imapc/imapc-save.c Mon Jun 25 19:40:24 2012 +0300
@@ -165,7 +165,8 @@
uint32_t uid = 0;
if (reply->state == IMAPC_COMMAND_STATE_OK) {
- if (strcasecmp(reply->resp_text_key, "APPENDUID") == 0)
+ if (reply->resp_text_key != NULL &&
+ strcasecmp(reply->resp_text_key, "APPENDUID") == 0)
imapc_save_appenduid(ctx->ctx, reply, &uid);
imapc_save_add_to_index(ctx->ctx, uid);
ctx->ret = 0;
@@ -354,7 +355,8 @@
uint32_t uid = 0;
if (reply->state == IMAPC_COMMAND_STATE_OK) {
- if (strcasecmp(reply->resp_text_key, "COPYUID") == 0)
+ if (reply->resp_text_key != NULL &&
+ strcasecmp(reply->resp_text_key, "COPYUID") == 0)
imapc_save_copyuid(ctx->ctx, reply, &uid);
imapc_save_add_to_index(ctx->ctx, uid);
ctx->ret = 0;
More information about the dovecot-cvs
mailing list