1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00

Fix query string validation in SQLite statement handle.

This commit is contained in:
Sandu Liviu Catalin 2017-03-05 12:58:42 +02:00
parent 9c1cefab37
commit fde47ba107

View File

@ -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);