aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-10-02 03:37:39 +0000
committerBart Polot <bart@net.in.tum.de>2015-10-02 03:37:39 +0000
commitd00dd9a2bdf4aacb7c289bfc6364b6f352004369 (patch)
treef4ed8dca9c78c3c8c2373399083875aa1c55da6e /src/cadet
parent7c5595a9ab563ebed557a77b56ad32b526e54892 (diff)
downloadgnunet-d00dd9a2bdf4aacb7c289bfc6364b6f352004369.tar.gz
gnunet-d00dd9a2bdf4aacb7c289bfc6364b6f352004369.zip
- fix processing of messages with no payload (keepalives)
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/gnunet-service-cadet_tunnel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c
index 6d415a8b2..e3c48dc3e 100644
--- a/src/cadet/gnunet-service-cadet_tunnel.c
+++ b/src/cadet/gnunet-service-cadet_tunnel.c
@@ -3032,7 +3032,6 @@ handle_decrypted (struct CadetTunnel *t,
3032 sprintf (buf, "# received encrypted of type %hu (%s)", type, GC_m2s (type)); 3032 sprintf (buf, "# received encrypted of type %hu (%s)", type, GC_m2s (type));
3033 GNUNET_STATISTICS_update (stats, buf, 1, GNUNET_NO); 3033 GNUNET_STATISTICS_update (stats, buf, 1, GNUNET_NO);
3034 3034
3035
3036 switch (type) 3035 switch (type)
3037 { 3036 {
3038 case GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE: 3037 case GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE:
@@ -3139,7 +3138,7 @@ GCT_handle_encrypted (struct CadetTunnel *t,
3139 this loop may be unaligned, see util's MST for 3138 this loop may be unaligned, see util's MST for
3140 how to do this right. */ 3139 how to do this right. */
3141 off = 0; 3140 off = 0;
3142 while (off + sizeof (struct GNUNET_MessageHeader) < decrypted_size) 3141 while (off + sizeof (struct GNUNET_MessageHeader) <= decrypted_size)
3143 { 3142 {
3144 uint16_t msize; 3143 uint16_t msize;
3145 3144