mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:03:02 +01:00
Hope this fix a problem detected by valgrind
This commit is contained in:
parent
41f1351b6a
commit
e97cccd79d
@ -5439,9 +5439,8 @@ int Parser::yylexAux()
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((c == '-') && (*lex.ptr == '-'))
|
||||
if ((c == '-') && (lex.ptr < lex.end) && (*lex.ptr == '-'))
|
||||
{
|
||||
|
||||
/* single-line */
|
||||
|
||||
lex.ptr++;
|
||||
@ -5456,9 +5455,8 @@ int Parser::yylexAux()
|
||||
return -1;
|
||||
continue;
|
||||
}
|
||||
else if ((c == '/') && (*lex.ptr == '*'))
|
||||
else if ((c == '/') && (lex.ptr < lex.end) && (*lex.ptr == '*'))
|
||||
{
|
||||
|
||||
/* multi-line */
|
||||
|
||||
const TEXT& start_block = lex.ptr[-1];
|
||||
@ -5639,7 +5637,7 @@ int Parser::yylexAux()
|
||||
// The resulting value is stored in a string descriptor and
|
||||
// returned to the parser as a string. This can be stored
|
||||
// in a character or binary item.
|
||||
if ((c == 'x' || c == 'X') && *lex.ptr == '\'')
|
||||
if ((c == 'x' || c == 'X') && (lex.ptr < lex.end) && *lex.ptr == '\'')
|
||||
{
|
||||
bool hexerror = false;
|
||||
|
||||
@ -5743,7 +5741,7 @@ int Parser::yylexAux()
|
||||
// to an integer, and the result returned to the caller. The
|
||||
// token is identified as a NUMBER if it's a 32-bit or less
|
||||
// value, or a NUMBER64INT if it requires a 64-bit number.
|
||||
if ((c == '0') && (*lex.ptr == 'x' || *lex.ptr == 'X') &&
|
||||
if ((c == '0') && (lex.ptr < lex.end) && (*lex.ptr == 'x' || *lex.ptr == 'X') &&
|
||||
(classes(lex.ptr[1]) & CHR_HEX))
|
||||
{
|
||||
bool hexerror = false;
|
||||
|
Loading…
Reference in New Issue
Block a user