]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Use 64-bit memory allocation APIs in the sqlite_stmt virtual table, to avoid
authordrh <>
Mon, 11 Jul 2022 19:48:48 +0000 (19:48 +0000)
committerdrh <>
Mon, 11 Jul 2022 19:48:48 +0000 (19:48 +0000)
harmless compiler warnings.

FossilOrigin-Name: 4c40b38cbe04ddd8c1ef442bf14e1625f5494d64c78ae830b9e01fe4c7243394

ext/misc/stmt.c
manifest
manifest.uuid

index 42f4d651d918731bca3125341cd0a3481f9fd236..1687f419782ba8f35552cff52237e73e87406191 100644 (file)
@@ -101,7 +101,7 @@ static int stmtConnect(
      "CREATE TABLE x(sql,ncol,ro,busy,nscan,nsort,naidx,nstep,"
                     "reprep,run,mem)");
   if( rc==SQLITE_OK ){
-    pNew = sqlite3_malloc( sizeof(*pNew) );
+    pNew = sqlite3_malloc64( sizeof(*pNew) );
     *ppVtab = (sqlite3_vtab*)pNew;
     if( pNew==0 ) return SQLITE_NOMEM;
     memset(pNew, 0, sizeof(*pNew));
@@ -123,7 +123,7 @@ static int stmtDisconnect(sqlite3_vtab *pVtab){
 */
 static int stmtOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
   stmt_cursor *pCur;
-  pCur = sqlite3_malloc( sizeof(*pCur) );
+  pCur = sqlite3_malloc64( sizeof(*pCur) );
   if( pCur==0 ) return SQLITE_NOMEM;
   memset(pCur, 0, sizeof(*pCur));
   pCur->db = ((stmt_vtab*)p)->db;
@@ -221,7 +221,7 @@ static int stmtFilter(
   for(p=sqlite3_next_stmt(pCur->db, 0); p; p=sqlite3_next_stmt(pCur->db, p)){
     const char *zSql = sqlite3_sql(p);
     sqlite3_int64 nSql = zSql ? strlen(zSql)+1 : 0;
-    StmtRow *pNew = (StmtRow*)sqlite3_malloc(sizeof(StmtRow) + nSql);
+    StmtRow *pNew = (StmtRow*)sqlite3_malloc64(sizeof(StmtRow) + nSql);
 
     if( pNew==0 ) return SQLITE_NOMEM;
     memset(pNew, 0, sizeof(StmtRow));
index 48be7542df22ec89a87fc55e0a4b824fd10c68c5..6bafec8d0fe404f5dc8e7934cab5b0fa1290f859 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\scompiler\swarnings.
-D 2022-07-11T19:29:48.871
+C Use\s64-bit\smemory\sallocation\sAPIs\sin\sthe\ssqlite_stmt\svirtual\stable,\sto\savoid\nharmless\scompiler\swarnings.
+D 2022-07-11T19:48:48.366
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -344,7 +344,7 @@ F ext/misc/shathree.c 7b17615869a495659f1569ada1d8d3d21b4a24614f2746d93cc87ef7c0
 F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
 F ext/misc/spellfix.c 94df9bbfa514a563c1484f684a2df3d128a2f7209a84ca3ca100c68a0163e29f
 F ext/misc/sqlar.c 0ace5d3c10fe736dc584bf1159a36b8e2e60fab309d310cd8a0eecd9036621b6
-F ext/misc/stmt.c 2d68161cb32de25b4510cb8662af2e1ffd4e41c6b7bfb3aa64a49468bb6d36c1
+F ext/misc/stmt.c ed05ad78013edccd43f4fc33d8244001f6f886eb2dfd2106ba33616ac514c6fb
 F ext/misc/templatevtab.c 8a16a91a5ceaccfcbd6aaaa56d46828806e460dd194965b3f77bf38f14b942c4
 F ext/misc/totype.c fa4aedeb07f66169005dffa8de3b0a2b621779fd44f85c103228a42afa71853b
 F ext/misc/uint.c 053fed3bce2e89583afcd4bf804d75d659879bbcedac74d0fa9ed548839a030b
@@ -1978,10 +1978,9 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 88b1b0327f6d2843a4c84b4f5249162cf81a86bfd43f9412ebe6142d7c2df2fb
-Q +3fe19452499afc8e6b38905e1ce7e9153adbfebf10dccf39da4b7f1b0cd24f05
-Q +4d6f907712e35eddf6af36eb823c3ccdfcdff1c63b2c224b3bcf34ffec95d511
-R bc9e6dfbdeec42a03dbc828bb643b3ee
+P 9931bb202e2a4e0a980ebc6164e8f1da6c724e07242f448058e1c4cc3694b2b3
+Q +afb9e60ee3b194f33664a6722356e5d3c69ce1d4da1a0affd92b8e6aaf4dd2da
+R d16627af746c54741e4cab44b1f34d72
 U drh
-Z db58db4b1a11aa135449c69a9c71bf61
+Z a1f575a7622ddbaae88f8db1e402ebc8
 # Remove this line to create a well-formed Fossil manifest.
index bb42a357db8684f9dc1722c58b8794cc72bacbdc..2f707883b83f04e092894ba94478e826f0c5f154 100644 (file)
@@ -1 +1 @@
-9931bb202e2a4e0a980ebc6164e8f1da6c724e07242f448058e1c4cc3694b2b3
\ No newline at end of file
+4c40b38cbe04ddd8c1ef442bf14e1625f5494d64c78ae830b9e01fe4c7243394
\ No newline at end of file