aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/shathree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/shathree.c')
-rw-r--r--ext/misc/shathree.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/misc/shathree.c b/ext/misc/shathree.c
index 56eba564c..56a5584f3 100644
--- a/ext/misc/shathree.c
+++ b/ext/misc/shathree.c
@@ -621,9 +621,11 @@ static void sha3QueryFunc(
}
nCol = sqlite3_column_count(pStmt);
z = sqlite3_sql(pStmt);
- n = (int)strlen(z);
- hash_step_vformat(&cx,"S%d:",n);
- SHA3Update(&cx,(unsigned char*)z,n);
+ if( z ){
+ n = (int)strlen(z);
+ hash_step_vformat(&cx,"S%d:",n);
+ SHA3Update(&cx,(unsigned char*)z,n);
+ }
/* Compute a hash over the result of the query */
while( SQLITE_ROW==sqlite3_step(pStmt) ){