mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-10-11 08:07:11 +02:00
Fix query string validation in SQLite statement handle.
This commit is contained in:
1 parent
9c1cefab37
commit
fde47ba107
1 file changed
+2
-2
@@ -51,9 +51,9 @@ void StmtHnd::Create(CSStr query, SQInteger length)
|
||||
STHROWF("Unable to prepare statement. Invalid connection handle");
|
||||
}
|
||||
// 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
|
||||
mQuery.assign(query, length);
|
||||
|
||||
Reference in new issue
Block a user