Re: issue with smime and mutt 1.5.5.1
On Sun, Jan 04, 2004 at 04:52:43PM -0600, Will Fiveash wrote:
> Second, if I use 'v' to view the attachments of the smime message I see
> another core dump. Below are the details.
>
> 0xff118720: putc+0x0004: ld [%i1 + 0xc], %l3
> Current function is state_attach_puts
> 1263 state_putc (*t, s);
> (dbx) where
> [1] putc(0x5b, 0x0, 0x41ca4, 0xff1177bc, 0xff1585e4, 0xff15c818), at
> 0xff118720
> =>[2] state_attach_puts(t = 0x1b87fc "[-- Error: unable to create OpenSSL
> subprocess! --]\n", s = 0xffbfe5d4), line 1263 in "muttlib.c"
> [3] smime_handle_entity(m = 0x2137e0, s = 0xffbfe5d4, outFile = 0x1c17e8),
> line 1722 in "smime.c"
> [4] smime_decrypt_mime(fpin = 0x1c17c8, fpout = 0xffbfe800, b = 0x2137e0,
> cur = 0xffbfe808), line 1899 in "smime.c"
> [5] crypt_smime_decrypt_mime(a = 0x1c17c8, b = 0xffbfe800, c = 0x2137e0, d
> = 0xffbfe808), line 326 in "cryptglue.c"
> [6] mutt_view_attachments(hdr = 0x1d8d28), line 923 in "recvattach.c"
> [7] mutt_index_menu(), line 2061 in "curs_main.c"
> [8] main(argc = 3, argv = 0xffbff5e4), line 907 in "main.c"
> (dbx) print t
> t = 0x1b87fc "[-- Error: unable to create OpenSSL subprocess! --]\n"
> (dbx) print s
> s = 0xffbfe5d4
> (dbx) print *s
> *s = {
> fpin = 0x1c17d8
> fpout = (nil)
> prefix = (nil)
> flags = 0
> }
>
> Note that state_attach_puts() calls:
> state_putc (*t, s);
> and in mutt.h:
> #define state_putc(x,y) fputc(x,(y)->fpout)
>
> and s->fpout == NULL.
Note that in smime_decrypt_mime() in smime.c I see:
mutt_unlink (tempfile);
s.fpout = tmpfp;
mutt_decode_attachment (b, &s);
fflush (tmpfp);
b->length = ftell (s.fpout);
b->offset = 0;
rewind (tmpfp);
s.fpin = tmpfp;
s.fpout = 0;
^^^^^^^^^^^ This is a problem.
mutt_mktemp (tempfile);
if ((*fpout = safe_fopen (tempfile, "w+")) == NULL)
{
mutt_perror (tempfile);
return (-1);
}
mutt_unlink (tempfile);
*cur = smime_handle_entity (b, &s, *fpout);
^^^^^^^^^^^^^^^^^^^^^^^^^^ this calls state_attach_puts()
which expects that s->fpout != NULL.
--
Will Fiveash