From 387bf0ccc29115ac8a50222e497a4d35bc527fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 24 May 2019 14:28:38 +0300 Subject: [PATCH] MXS-2507: Fix avrorouter token processing The token comparison function did the comparison wrong: The token needs to be an exact match instead of a partial one. --- server/modules/routing/avrorouter/avro_schema.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/routing/avrorouter/avro_schema.c b/server/modules/routing/avrorouter/avro_schema.c index 45360ae71..76c72bfd2 100644 --- a/server/modules/routing/avrorouter/avro_schema.c +++ b/server/modules/routing/avrorouter/avro_schema.c @@ -1273,7 +1273,7 @@ static bool token_is_keyword(const char* tok, int len) { for (int i = 0; keywords[i]; i++) { - if (strncasecmp(keywords[i], tok, len) == 0) + if (strncasecmp(keywords[i], tok, len) == 0 && strlen(keywords[i]) == len) { return true; }