From: drh <> Date: Fri, 31 Jul 2026 22:45:45 +0000 (+0000) Subject: The use of sqlite3_set_clientdata() to limit recursion in [4687e04d948b787c] X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f034d515b4208e1c9325271aef3dc4901f24e216;p=thirdparty%2Fsqlite.git The use of sqlite3_set_clientdata() to limit recursion in [4687e04d948b787c] is incorrect. Fixed here. FossilOrigin-Name: bf44a08adc94b8c7c69921a1292d56bec0cbd9f3ac772e31d8ea5866e9f46063 --- diff --git a/ext/misc/sha1.c b/ext/misc/sha1.c index b50cf5e7b7..11a94c2ac5 100644 --- a/ext/misc/sha1.c +++ b/ext/misc/sha1.c @@ -320,7 +320,6 @@ static void sha1QueryFunc( *pIsRecursive = 1; return; } - sqlite3_set_clientdata(db, "sha1_query()", &isRecursive, 0); hash_init(&cx); while( zSql[0] ){ rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, &zSql); @@ -347,6 +346,7 @@ static void sha1QueryFunc( hash_step(&cx,(unsigned char*)z,n); /* Compute a hash over the result of the query */ + sqlite3_set_clientdata(db, "sha1_query()", &isRecursive, 0); while( SQLITE_ROW==sqlite3_step(pStmt) ){ hash_step(&cx,(const unsigned char*)"R",1); for(i=0; i