1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-03 16:53:36 +03:00

Fix an possible NULL pointer deference in the command-line shell that can

occur when using imposter mode.

FossilOrigin-Name: ad08753a8bbf073ec4af9c3a5783ed664244d954
This commit is contained in:
drh
2016-11-03 02:25:30 +00:00
parent 506a1400a3
commit 6027561178
3 changed files with 8 additions and 7 deletions

View File

@@ -1901,6 +1901,7 @@ static int shell_exec(
continue;
}
zStmtSql = sqlite3_sql(pStmt);
if( zStmtSql==0 ) zStmtSql = "";
while( IsSpace(zStmtSql[0]) ) zStmtSql++;
/* save off the prepared statment handle and reset row count */