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

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

bug#49055: 28.0.50; [PATCH] De-obfuscate gnutls_handshake loop


From: Eli Zaretskii
Subject: bug#49055: 28.0.50; [PATCH] De-obfuscate gnutls_handshake loop
Date: Sat, 19 Jun 2021 16:47:58 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: dick.r.chiang@gmail.com,  49055@debbugs.gnu.org
> Date: Sat, 19 Jun 2021 15:40:19 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> I think that makes sense, so I've now applied your patch to Emacs 28.
> >
> > The code wasn't really 100% equivalent, though.
> 
> No -- it looped in two different ways, but staring at the code, I
> convinced myself that it should be functionally equivalent.
> 
> I may be misreading the code, though.

What bothers me:

  . the gnutls_error_is_fatal call is missing from the new code
  . the negative values of 'ret' (if they are significant) aren't
    tested anymore
  . the condition of GNUTLS_E_INTERRUPTED is tested only once, and
    immediately causes the outer while-loop to be abandoned

I'd love to see some rationale for these differences.  For example,
the last difference seems to have a potential of causing failure of
handshaking if the user happens to type some input (in GUI sessions),
or C-g in text-mode sessions, at some opportune moment.





reply via email to

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