On Sun, Jul 22, 2018 at 03:35:38AM +0200, Vincent Lefevre wrote: > I'm wondering whether there could be similar bugs in other parts > of the code, where vcount is reset to 0, but not vsize.
Nice sleuthing! > mbox.c has: > [...] > but nothing related to vsize. Since this is a reset (reopen), I think you're right, and vsize should be cleared here too. > sort.c has "ctx->vcount = 0;" twice, but nothing about vsize. > > I don't know whether this is correct. The first time, I'm not sure about, but since ctx->msgcount is 0, it would seem safe to reset vsize too. I think the second time is okay. The routine is just resorting, and updating the virtual and v2r fields with the assumption that the actual visible headers hasn't changed. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature