[gnutls-devel] GnuTLS | gnutls_int.h: make DECR_LEN neutral to signedness (!1056)
Development of GNU's TLS library
gnutls-devel at lists.gnutls.org
Wed Sep 11 17:43:09 CEST 2019
Daiki Ueno commented on a discussion on lib/gnutls_int.h: https://gitlab.com/gnutls/gnutls/merge_requests/1056#note_215765092
>
> #define MEMSUB(x,y) ((ssize_t)((ptrdiff_t)x-(ptrdiff_t)y))
>
> -#define DECR_LEN(len, x) do { len-=x; if (len<0) {gnutls_assert(); return GNUTLS_E_UNEXPECTED_PACKET_LENGTH;} } while (0)
> +#define DECR_LEN(len, x) do { if (len<x) {gnutls_assert(); return GNUTLS_E_UNEXPECTED_PACKET_LENGTH;} else len-=x; } while (0)
Ah, I see. Fixed now.
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1056#note_215765092
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/20190911/ef03c108/attachment.html>
More information about the Gnutls-devel
mailing list