Re: [PATCH] smime segfault on empty keys/.index file
On Sun, Sep 12, 2010 at 10:43:22AM -0700, Michael Elkins wrote:
> >While trying to resolve my struggle with adding a S/MIME key to my account
> >(see post on mutt-users) and by manually tinkering with files, I got mutt
> >to segfault repeatedly.
> >
> >The attached (tiny) patch should prevent this from happening when the
> >.smime/keys/.index file exists but is empty.
> >
> >I realise the fix is a trivial one, but hopefully it'll still be of some
> >use to you.
>
> Thanks for the bug report + patch. I just committed a modified
> patch to clean up that function. The 'cert_num' variable was
> supposed to be the count of the number of certs, but it counts
> lines, where the loop only bumps the counter when the line matches a
> valid format.
>
> I would appreciate it if you can double check the change.
Hi Michael,
mutt no longer crashes with your patch. Thanks!
Remco