summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-10-31 14:25:26 +0400
committerAlexander Barkov <bar@mariadb.com>2018-10-31 14:25:26 +0400
commit75ceb6ff130cdac67fadc1d45cd64578a19b4835 (patch)
tree6364705fb91cb327fed6d53053b43f85ec22ac54 /strings
parent09e97299ba893b7578cac8160b3b687b0594aeee (diff)
downloadmariadb-git-75ceb6ff130cdac67fadc1d45cd64578a19b4835.tar.gz
MDEV-17298 ASAN unknown-crash / READ of size 1 in my_strntoul_8bit upon INSERT .. SELECT
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-simple.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 61b14b84820..8d12c05db18 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -454,7 +454,6 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
register uint cutlim;
register uint32 i;
register const char *s;
- register uchar c;
const char *save, *e;
int overflow;
@@ -489,8 +488,9 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
overflow = 0;
i = 0;
- for (c = *s; s != e; c = *++s)
+ for ( ; s != e; ++s)
{
+ register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')