From: Christian Grothoff Date: Fri, 10 Mar 2017 16:56:17 +0000 (+0100) Subject: fix integer overflow test to actually work X-Git-Tag: gnunet-0.11.0rc0~291^2~15 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ee232f9c14bd879235e6586484083ff91addd052;p=oweals%2Fgnunet.git fix integer overflow test to actually work --- diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 76132523b..eb48341b7 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -1623,7 +1623,7 @@ enqueue (struct Plugin *plugin, GNUNET_break (0); return; } - if (plugin->bytes_in_buffer + udpw->msg_size > INT64_MAX) + if (plugin->bytes_in_buffer > INT64_MAX - udpw->msg_size) { GNUNET_break (0); }