On Jul 18, 2008, at 8:40 PM, Johannes Berg wrote:
Can you help me maybe? I don't see the bug.
..
0x100929f4 in mail_get_physical_size (mail=0x0, size_r=0xbfeaf030) at mail.c:100100 return p->v.get_physical_size(mail, size_r); (gdb) bt#0 0x100929f4 in mail_get_physical_size (mail=0x0, size_r=0xbfeaf030) at mail.c:100 #1 0x0fe29be0 in quota_try_alloc (ctx=0x101707a8, mail=0x0, too_large_r=0xbfeaf060)at quota.c:818
..
return quota_check(ctx->transaction, ctx->dest_mail != NULL ? ctx->dest_mail : qt->tmp_mail);
I recently wondered about that code. The problem is: 1. save_init() is called with dest_mail=NULL2. antispam sees that dest_mail=NULL and sets it, and calls super.save_init()
3. quota sees that dest_mail != NULL so it doesn't set qt->tmp_mail4. mailbox_save_init() stores ctx->dest_mail = NULL (because it doesn't see the updated value)
So the quota code eventually sees both ctx->dest_mail = NULL and qt- >tmp_mail = NULL. I'm not really sure what the right fix for this is.. ctx->dest_mail should be set by something. Perhaps if quota/ antispam overrides it it should set it, and mailbox_save_init() shouldn't set it if it's already set..
PGP.sig
Description: This is a digitally signed message part