From 526231bc223e81978f332e884357049442b380b9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 2 Jul 2014 08:47:36 +0200 Subject: [PATCH] initialize store_t::name the field is marked foreign (for the drivers), so a recycled store may contain an old pointer in it. that would make our error path crash. REFMAIL: CAF_KswU7aBS7unnK+rdZy1PG_8SZUAW=tcg75HixDLLE0w3Lhw@mail.gmail.com --- src/sync.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sync.c b/src/sync.c index 463b5f4..51c64a9 100644 --- a/src/sync.c +++ b/src/sync.c @@ -598,6 +598,7 @@ sync_boxes( store_t *ctx[], const char *names[], channel_conf_t *chan, svars->uidval[0] = svars->uidval[1] = -1; svars->srecadd = &svars->srecs; + ctx[0]->name = ctx[1]->name = 0; for (t = 0; t < 2; t++) { ctx[t]->orig_name = (!names[t] || (ctx[t]->conf->map_inbox && !strcmp( ctx[t]->conf->map_inbox, names[t] ))) ?