mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 16:57:16 +01:00
Fix query string validation in SQLite statement handle.
This commit is contained in:
parent
9c1cefab37
commit
fde47ba107
@ -51,9 +51,9 @@ void StmtHnd::Create(CSStr query, SQInteger length)
|
|||||||
STHROWF("Unable to prepare statement. Invalid connection handle");
|
STHROWF("Unable to prepare statement. Invalid connection handle");
|
||||||
}
|
}
|
||||||
// Is the specified query string valid?
|
// Is the specified query string valid?
|
||||||
else if (!query || *query || !length)
|
else if (!query || !length || *query == '\0')
|
||||||
{
|
{
|
||||||
STHROWF("Unable to prepare statement. Invalid query string");
|
STHROWF("Unable to prepare statement. Invalid or empty query string");
|
||||||
}
|
}
|
||||||
// Save the query string
|
// Save the query string
|
||||||
mQuery.assign(query, length);
|
mQuery.assign(query, length);
|
||||||
|
Loading…
Reference in New Issue
Block a user