Package: mutt
Version: 1.5.16-3
Severity: grave
Justification: renders package unusable

After upgrading to the new version of libgnutls13 in unstable, mutt
fails to connect to my imaps server with "tls_socket_read ((unknown
error code))".
Downgrading to libgnutls13 1.6.3-1 fixes it.
Apparently mutt calls gnutls_error_is_fatal() even when
gnutls_record_recv() returns a positive value (success), but the default
return value of that function has changed from 0 to 1 in the new gnutls.

The comment on top of gnutls_error_is_fatal() in gnutls_errors.c says:
  * @error: is an error returned by a gnutls function. Error should be a
  * negative value.

The following (untested) patch should fix that particular problem.

--- mutt_ssl_gnutls.c.orig      2007-08-27 12:12:09.000000000 +0200
+++ mutt_ssl_gnutls.c   2007-08-27 12:12:43.000000000 +0200
@@ -99,7 +99,7 @@
   }
 
   ret = gnutls_record_recv (data->state, buf, len);
-  if (gnutls_error_is_fatal(ret) == 1)
+  if (ret < 0 && gnutls_error_is_fatal(ret) == 1)
   {
     mutt_error ("tls_socket_read (%s)", gnutls_strerror (ret));
     mutt_sleep (4);
@@ -121,7 +121,7 @@
   }
 
   ret = gnutls_record_send (data->state, buf, len);
-  if (gnutls_error_is_fatal(ret) == 1)
+  if (ret < 0 && gnutls_error_is_fatal(ret) == 1)
   {
     mutt_error ("tls_socket_write (%s)", gnutls_strerror (ret));
     mutt_sleep (4);

Cheers,
Julien


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to