From df23e506d4c379475feaf531ba42a4654d541ce8 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Thu, 23 Apr 2020 16:08:48 +0000 Subject: [PATCH] Fixed CORE-6290 - Hex number used at end of statement (for exame with CREATE DOMAIN ... DEFAULT) may read invalid memory and produce wrong values or exceptions. --- src/dsql/Parser.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dsql/Parser.cpp b/src/dsql/Parser.cpp index 3faf22c2e1..64211687e9 100644 --- a/src/dsql/Parser.cpp +++ b/src/dsql/Parser.cpp @@ -809,14 +809,8 @@ int Parser::yylexAux() // Time to scan the string. Make sure the characters are legal, // and find out how long the hex digit string is. - for (;;) + while (lex.ptr < lex.end) { - if (charlen == 0 && lex.ptr >= lex.end) // Unexpected EOS - { - hexerror = true; - break; - } - c = *lex.ptr; if (!(classes(c) & CHR_HEX)) // End of digit string