mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-31881 ASAN: unknown-crash in check_ulonglong (sql/sql_analyse.cc) on SELECT ... FROM ... PROCEDURE ANALYSE()
Fixing a wrong condition which made the code read 1 byte behind the buffer.
This commit is contained in:
@ -1204,7 +1204,7 @@ uint check_ulonglong(const char *str, uint length)
|
||||
const char *long_str = "2147483647", *ulonglong_str = "18446744073709551615";
|
||||
const uint long_len = 10, ulonglong_len = 20;
|
||||
|
||||
while (*str == '0' && length)
|
||||
while (length && *str == '0')
|
||||
{
|
||||
str++; length--;
|
||||
}
|
||||
|
Reference in New Issue
Block a user