From f91daf5c6cef250f53c400a3e47b21c54b00bec8 Mon Sep 17 00:00:00 2001 From: Alexander Peresypkin <7003484@gmail.com> Date: Sun, 21 Jul 2019 14:19:23 +0200 Subject: [PATCH] Fix parsing text values in binary operands. Bug https://bugs.mysql.com/bug.php?id=95960 --- strings/my_strtoll10.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/strings/my_strtoll10.c b/strings/my_strtoll10.c index 1fb4f0c2335..f615104044e 100644 --- a/strings/my_strtoll10.c +++ b/strings/my_strtoll10.c @@ -16,6 +16,7 @@ #include #include /* Needed for MY_ERRNO_ERANGE */ #include +#include #define MAX_NEGATIVE_NUMBER ((ulonglong) 0x8000000000000000LL) #define INIT_CNT 9 @@ -86,7 +87,7 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error) if (endptr) { end= *endptr; - while (s != end && (*s == ' ' || *s == '\t')) + while (s != end && isspace(*s)) s++; if (s == end) goto no_conv; @@ -94,7 +95,7 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error) else { endptr= &dummy; /* Easier end test */ - while (*s == ' ' || *s == '\t') + while (isspace(*s)) s++; if (!*s) goto no_conv;