bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46709: 28.0.50; Emacs crash in gnutls_handshake


From: Lars Ingebrigtsen
Subject: bug#46709: 28.0.50; Emacs crash in gnutls_handshake
Date: Wed, 24 Feb 2021 17:55:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Robert Pluim <rpluim@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]