From 13200e8c74e04be3e363c9a4e642fb8e46b22c00 Mon Sep 17 00:00:00 2001 From: Yuval Hager Date: Tue, 12 May 2015 11:17:30 -0700 Subject: [PATCH] MXS-137: correct calculation of query length when length is >= 0x80 --- server/core/modutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/core/modutil.c b/server/core/modutil.c index 60ad6c1b2..ecd3b51a9 100644 --- a/server/core/modutil.c +++ b/server/core/modutil.c @@ -258,7 +258,8 @@ char * modutil_get_SQL(GWBUF *buf) { unsigned int len, length; -char *ptr, *dptr, *rval = NULL; +unsigned char *ptr; +char *dptr, *rval = NULL; if (!modutil_is_SQL(buf) && !modutil_is_SQL_prepare(buf)) return rval;