From f297cfbbfabe7d2459b49746949fcf19b74d6cd3 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Tue, 17 Jun 2014 12:13:36 +0000 Subject: [PATCH] IMPORTANT FIX: use return value for integrity check --- src/cadet/gnunet-service-cadet_tunnel.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index dd73be63e..4597a24a7 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -1944,6 +1944,12 @@ GCT_handle_encrypted (struct CadetTunnel *t, decrypted_size = t_decrypt_and_validate (t, cbuf, &msg[1], payload_size, msg->iv, &msg->hmac); + if (-1 == decrypted_size) + { + GNUNET_break_op (0); + return; + } + off = 0; while (off < decrypted_size) { -- 2.25.1