From 48ef9754df0122610e4e32774e2836f83579a377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 16 Oct 2020 12:19:15 +0300 Subject: [PATCH] MXS-3241: Check buffer length The `is_set` call assumes that at least three characters are present. --- server/modules/protocol/MySQL/mariadbclient/setparser.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/mariadbclient/setparser.hh b/server/modules/protocol/MySQL/mariadbclient/setparser.hh index 76564b8d0..350532af6 100644 --- a/server/modules/protocol/MySQL/mariadbclient/setparser.hh +++ b/server/modules/protocol/MySQL/mariadbclient/setparser.hh @@ -185,7 +185,7 @@ public: bypass_whitespace(); - if (is_set(m_pI)) + if (m_pEnd - m_pI > 3 && is_set(m_pI)) { rv = parse(pResult); }