GNU bug report logs - #46709
28.0.50; Emacs crash in gnutls_handshake

Previous Next

Package: emacs;

Reported by: Robert Pluim <rpluim <at> gmail.com>

Date: Mon, 22 Feb 2021 18:37:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 46709 <at> debbugs.gnu.org
Subject: bug#46709: 28.0.50; Emacs crash in gnutls_handshake
Date: Wed, 24 Feb 2021 17:55:58 +0100
Robert Pluim <rpluim <at> gmail.com> writes:

> My reading of
> <https://gnutls.org/manual/gnutls.html#gnutls_005fhandshake> is that
> after receiving a fatal error, we should not call gnutls_handshake
> again. Iʼve tested the following patch successfully. We currently
> check only for GNUTLS_E_INTERRUPTED, but the list of non-fatal error
> codes is more than that, so perhaps more is needed.
>
> diff --git a/src/gnutls.c b/src/gnutls.c
> index aa245ee5c3..4d5a909db0 100644
> --- a/src/gnutls.c
> +++ b/src/gnutls.c
> @@ -625,6 +625,8 @@ gnutls_try_handshake (struct Lisp_Process *proc)
>
>    while ((ret = gnutls_handshake (state)) < 0)
>      {
> +      if (gnutls_error_is_fatal (ret))
> +	return emacs_gnutls_handle_error (state, ret);

Yes, I think that this looks like the correct fix here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.