Check remaining query length in SetSqlModeParser
SetSqlModeParser would read uninitialized memory if a query consisting of only comments would be executed.
This commit is contained in:
@ -156,7 +156,10 @@ public:
|
|||||||
|
|
||||||
bypass_whitespace();
|
bypass_whitespace();
|
||||||
|
|
||||||
if (is_set(m_pI))
|
// Check that there's enough characters to contain a SET keyword
|
||||||
|
bool long_enough = m_pEnd - m_pI > 3 ;
|
||||||
|
|
||||||
|
if (long_enough && is_set(m_pI))
|
||||||
{
|
{
|
||||||
rv = parse(pSql_mode);
|
rv = parse(pSql_mode);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user