From a47f6e99fffa6f88f9b3d438e750bed28c73c1c6 Mon Sep 17 00:00:00 2001 From: Alexander Peresypkin <7003484@gmail.com> Date: Sun, 21 Jul 2019 14:38:51 +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 dc776e1d3a4..588ac48a78e 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) LL(0x8000000000000000)) #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;