[PATCH] fix to fetch-mail core dump in 1.5.5.1
I discovered that the fetch-mail function (bound by default to 'G')
of mutt-1.5.5.1 dumps core, at least on this HP-UX 10.20 system
without the GNU IDN library. I traced the problem to the
raw_socket_open() function in mutt_socket.c. A couple of #ifdefs
were omitted when support for the GNU IDN library was added to this
function, with the result that FREE() was called to free some memory
that couldn't be freed. A patch is attached.
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA
--- mutt_socket.c.orig 2003-03-04 01:50:13.000000000 -0800
+++ mutt_socket.c 2004-01-06 01:08:03.000000000 -0800
@@ -483,13 +483,17 @@
if ((he = gethostbyname (host_idna)) == NULL)
{
+# ifdef HAVE_LIBIDN
FREE (&host_idna);
+# endif
mutt_error (_("Could not find the host \"%s\""), conn->account.host);
return -1;
}
+# ifdef HAVE_LIBIDN
FREE (&host_idna);
+# endif
mutt_message (_("Connecting to %s..."), conn->account.host);