From ee232f9c14bd879235e6586484083ff91addd052 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 10 Mar 2017 17:56:17 +0100 Subject: [PATCH] fix integer overflow test to actually work --- src/transport/plugin_transport_udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.25.1