1 file changed, 4 insertions(+), 1 deletion(-) imap/imap.c | 5 ++++-
# HG changeset patch # User Erik Hovland <e...@hovland.org> # Date 1236899421 25200 # Branch HEAD # Node ID d600c2c8818d9b15a3fb707e58594d0005c1e05d # Parent f844e40f72874009c799459b7df1d40f31608dea Make sure ctx->hdrs is valid before dereferencing. diff --git a/imap/imap.c b/imap/imap.c --- a/imap/imap.c +++ b/imap/imap.c @@ -1286,7 +1286,10 @@ } for (n = 0; n < ctx->msgcount; n++) - ctx->hdrs[n]->changed = 0; + { + if (ctx->hdrs) + ctx->hdrs[n]->changed = 0; + } ctx->changed = 0; /* We must send an EXPUNGE command if we're not closing. */