[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
Mon Sep 9 10:31:47 CEST 2019
Daiki Ueno commented on a discussion on lib/gnutls_int.h: https://gitlab.com/gnutls/gnutls/merge_requests/1056#note_214038901
>
> #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)
I'm not sure if I understand your concern; could you elaborate a bit?
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/1056#note_214038901
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/20190909/2b9a18e4/attachment.html>
More information about the Gnutls-devel
mailing list