From 67d82146f1d25e293d3d48b18d258c8aa32c8711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 26 Jun 2019 09:19:24 +0300 Subject: [PATCH] Fix packet length assertion The `used_len + len` can be the same as `total_len`. --- server/modules/protocol/MySQL/rwbackend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/rwbackend.cc b/server/modules/protocol/MySQL/rwbackend.cc index b444fb8df..1b460e59a 100644 --- a/server/modules/protocol/MySQL/rwbackend.cc +++ b/server/modules/protocol/MySQL/rwbackend.cc @@ -295,7 +295,7 @@ void RWBackend::process_packets(GWBUF* result) len |= (*it++) << 16; ++it; // Skip the sequence mxb_assert(it != buffer.end()); - mxb_assert(used_len + len < total_len); + mxb_assert(used_len + len <= total_len); MXB_AT_DEBUG(used_len += len); auto end = it; end.advance(len);