[gnutls-devel] GnuTLS | gnutls-serv: improvements in UDP server (!863)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Wed Jan 23 16:01:17 CET 2019
Dmitry Eremin-Solenikov started a new discussion on src/udp-serv.c:
> recvfrom(sock, buffer, sizeof(buffer)-1, MSG_PEEK,
> (struct sockaddr *) &cli_addr,
> &cli_addr_size);
> - if (ret > 0) {
> +
> + /* only accept a valid client hello */
> + if (ret > 13 && buffer[0] == 22 && buffer[13] == 1) {
`13` and `22` look like magic numbers here. Can we get rid of them somehow?
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/863#note_134174981
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190123/136003a6/attachment.html>
More information about the Gnutls-devel
mailing list