Skip to content

Commit 22e55dc

Browse files
committed
Prepare release of version 2.3.3
Update to SQLite 3.53.0
1 parent a8a8ea1 commit 22e55dc

18 files changed

Lines changed: 38297 additions & 28823 deletions

CHANGELOG.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.3.3] - 2026-04-10
11+
12+
### Changed
13+
14+
- Based on SQLite version 3.53.0
15+
16+
### Fixed
17+
18+
- Fixed issue [#230](../../issues/228) - Cipher data structures are not nullified securely on freeing
19+
1020
## [2.3.2] - 2026-03-19
1121

1222
### Fixed
1323

14-
- Fixed issue [#227](../../issues/227) - Compile AEGIS with clang version 22 and above
15-
- Fixed issue [#228](../../issues/228) - Function `sqlite3mc_cipher_name` not thread-safe
16-
- Fixed issue [#229](../../issues/229) - Symbol conflicts when static linking to both `sqlite3mc` and `libsodium`
24+
- Fixed issue [#227](../../issues/226) - Compile AEGIS with clang version 22 and above
25+
- Fixed issue [#228](../../issues/227) - Function `sqlite3mc_cipher_name` not thread-safe
26+
- Fixed issue [#229](../../issues/228) - Symbol conflicts when static linking to both `sqlite3mc` and `libsodium`
1727

1828
## [2.3.1] - 2026-03-13
1929

@@ -728,7 +738,8 @@ The following ciphers are supported:
728738
- AES 256 Bit CBC - SHA1/SHA256/SHA512 HMAC ([SQLCipher](https://www.zetetic.net/sqlcipher/), database versions 1, 2, 3, and 4)
729739
- RC4 - No HMAC ([System.Data.SQLite](http://system.data.sqlite.org))
730740

731-
[Unreleased]: ../../compare/v2.3.2...HEAD
741+
[Unreleased]: ../../compare/v2.3.3...HEAD
742+
[2.3.3]: ../../compare/v2.3.2...v2.3.3
732743
[2.3.2]: ../../compare/v2.3.1...v2.3.2
733744
[2.3.1]: ../../compare/v2.3.0...v2.3.1
734745
[2.3.0]: ../../compare/v2.2.7...v2.3.0

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.24.0.0)
2-
project(sqlite3mc VERSION 2.3.2)
2+
project(sqlite3mc VERSION 2.3.3)
33

44
# Helper macro
55
macro(_Enable_MT _target)

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dnl Copyright (C) 2019-2026 Ulrich Telle <github@telle-online.de>
44
dnl
55
dnl This file is covered by the same licence as the entire SQLite3 Multiple Ciphers package.
66

7-
AC_INIT([sqlite3mc], [2.3.2], [github@telle-online.de])
7+
AC_INIT([sqlite3mc], [2.3.3], [github@telle-online.de])
88

99
dnl This is the version tested with, might work with earlier ones.
1010
AC_PREREQ([2.69])

readme.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ The code was mainly developed under Windows, but was tested under Linux as well.
1010

1111
## Version information
1212

13-
* 2.3.2 - *March 2026*
14-
- Fixed issue #227: Compile AEGIS with clang version 22 and above
15-
- Fixed issue #228: Function `sqlite3mc_cipher_name` not thread-safe
16-
- Fixed issue #229: Symbol conflicts when static linking to both `sqlite3mc` and `libsodium`
13+
* 2.3.3 - *April 2026*
14+
- Based on SQLite version 3.53.0
15+
- Fixed issue #230: Cipher data structures are not nullified securely on freeing
1716

1817
For further version information please consult the [CHANGELOG](CHANGELOG.md).
1918

src/aegis/common/common.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@
2323
#ifdef __ANDROID_API__
2424
# if __ANDROID_API__ < 18
2525
# undef HAVE_GETAUXVAL
26-
# endif
27-
# if defined(__clang__) || defined(__GNUC__)
28-
# if __has_include(<cpu-features.h>)
29-
# define HAVE_ANDROID_GETCPUFEATURES
30-
# endif
26+
# define HAVE_ANDROID_GETCPUFEATURES
3127
# endif
3228
#endif
3329
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64)

src/csv.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ SQLITE_EXTENSION_INIT1
6464

6565
#ifndef SQLITEINT_H
6666
typedef sqlite3_int64 i64;
67+
typedef sqlite3_uint64 u64;
6768
#endif
6869

6970
/* Max size of the error message in a CsvReader */
@@ -128,7 +129,7 @@ static int csv_reader_open(
128129
const char *zData /* ... or use this data */
129130
){
130131
if( zFilename ){
131-
p->zIn = sqlite3_malloc( CSV_INBUFSZ );
132+
p->zIn = sqlite3_malloc64( CSV_INBUFSZ );
132133
if( p->zIn==0 ){
133134
csv_errmsg(p, "out of memory");
134135
return 1;
@@ -221,7 +222,7 @@ static char *csv_read_one_field(CsvReader *p){
221222
}
222223
if( c=='"' ){
223224
int pc, ppc;
224-
int startLine = p->nLine;
225+
i64 startLine = p->nLine;
225226
pc = ppc = 0;
226227
while( 1 ){
227228
c = csv_getc(p);
@@ -325,7 +326,7 @@ typedef struct CsvCursor {
325326
sqlite3_vtab_cursor base; /* Base class. Must be first */
326327
CsvReader rdr; /* The CsvReader object */
327328
char **azVal; /* Value of the current row */
328-
int *aLen; /* Length of each entry */
329+
i64 *aLen; /* Length of each entry */
329330
sqlite3_int64 iRowid; /* The current rowid. Negative for EOF */
330331
} CsvCursor;
331332

@@ -497,7 +498,7 @@ static int csvtabConnect(
497498
CsvTable *pNew = 0; /* The CsvTable object to construct */
498499
int bHeader = -1; /* header= flags. -1 means not seen yet */
499500
int rc = SQLITE_OK; /* Result code from this routine */
500-
int i, j; /* Loop counters */
501+
u64 i, j; /* Loop counters */
501502
#ifdef SQLITE_TEST
502503
int tstFlags = 0; /* Value for testflags=N parameter */
503504
#endif
@@ -516,7 +517,7 @@ static int csvtabConnect(
516517
assert( sizeof(azPValue)==sizeof(azParam) );
517518
memset(&sRdr, 0, sizeof(sRdr));
518519
memset(azPValue, 0, sizeof(azPValue));
519-
for(i=3; i<argc; i++){
520+
for(i=3; i<(u64)argc; i++){
520521
const char *z = argv[i];
521522
const char *zValue;
522523
for(j=0; j<sizeof(azParam)/sizeof(azParam[0]); j++){
@@ -563,7 +564,7 @@ static int csvtabConnect(
563564
){
564565
goto csvtab_connect_error;
565566
}
566-
pNew = sqlite3_malloc( sizeof(*pNew) );
567+
pNew = sqlite3_malloc64( sizeof(*pNew) );
567568
*ppVtab = (sqlite3_vtab*)pNew;
568569
if( pNew==0 ) goto csvtab_connect_oom;
569570
memset(pNew, 0, sizeof(*pNew));
@@ -709,12 +710,12 @@ static int csvtabOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
709710
CsvTable *pTab = (CsvTable*)p;
710711
CsvCursor *pCur;
711712
size_t nByte;
712-
nByte = sizeof(*pCur) + (sizeof(char*)+sizeof(int))*pTab->nCol;
713+
nByte = sizeof(*pCur) + (sizeof(char*)+sizeof(i64))*pTab->nCol;
713714
pCur = sqlite3_malloc64( nByte );
714715
if( pCur==0 ) return SQLITE_NOMEM;
715716
memset(pCur, 0, nByte);
716717
pCur->azVal = (char**)&pCur[1];
717-
pCur->aLen = (int*)&pCur->azVal[pTab->nCol];
718+
pCur->aLen = (i64*)&pCur->azVal[pTab->nCol];
718719
*ppCursor = &pCur->base;
719720
if( csv_reader_open(&pCur->rdr, pTab->zFilename, pTab->zData) ){
720721
csv_xfer_error(pTab, &pCur->rdr);
@@ -946,6 +947,7 @@ static sqlite3_module CsvModuleFauxWrite = {
946947

947948
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
948949

950+
949951
#ifndef SQLITE_API
950952
#define SQLITE_API
951953
#endif

src/fileio.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@
7373
** $path is a relative path, then $path is interpreted relative to $dir.
7474
** And the paths returned in the "name" column of the table are also
7575
** relative to directory $dir.
76-
**
77-
** Notes on building this extension for Windows:
78-
** Unless linked statically with the SQLite library, a preprocessor
79-
** symbol, FILEIO_WIN32_DLL, must be #define'd to create a stand-alone
80-
** DLL form of this extension for WIN32. See its use below for details.
8176
*/
8277
#include "sqlite3ext.h"
8378
SQLITE_EXTENSION_INIT1
@@ -618,7 +613,7 @@ static int fsdirConnect(
618613
(void)pzErr;
619614
rc = sqlite3_declare_vtab(db, "CREATE TABLE x" FSDIR_SCHEMA);
620615
if( rc==SQLITE_OK ){
621-
pNew = (fsdir_tab*)sqlite3_malloc( sizeof(*pNew) );
616+
pNew = (fsdir_tab*)sqlite3_malloc64( sizeof(*pNew) );
622617
if( pNew==0 ) return SQLITE_NOMEM;
623618
memset(pNew, 0, sizeof(*pNew));
624619
sqlite3_vtab_config(db, SQLITE_VTAB_DIRECTONLY);
@@ -641,7 +636,7 @@ static int fsdirDisconnect(sqlite3_vtab *pVtab){
641636
static int fsdirOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
642637
fsdir_cursor *pCur;
643638
(void)p;
644-
pCur = sqlite3_malloc( sizeof(*pCur) );
639+
pCur = sqlite3_malloc64( sizeof(*pCur) );
645640
if( pCur==0 ) return SQLITE_NOMEM;
646641
memset(pCur, 0, sizeof(*pCur));
647642
pCur->iLvl = -1;

src/regexp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static void re_add_state(ReStateSet *pSet, int newState){
146146

147147
/* Extract the next unicode character from *pzIn and return it. Advance
148148
** *pzIn to the first byte past the end of the character returned. To
149-
** be clear: this routine converts utf8 to unicode. This routine is
149+
** be clear: this routine converts utf8 to unicode. This routine is
150150
** optimized for the common case where the next character is a single byte.
151151
*/
152152
static unsigned re_next_char(ReInput *p){
@@ -217,7 +217,7 @@ static int re_match(ReCompiled *pRe, const unsigned char *zIn, int nIn){
217217
/* Look for the initial prefix match, if there is one. */
218218
if( pRe->nInit ){
219219
unsigned char x = pRe->zInit[0];
220-
while( in.i+pRe->nInit<=in.mx
220+
while( in.i+pRe->nInit<=in.mx
221221
&& (zIn[in.i]!=x ||
222222
strncmp((const char*)zIn+in.i, (const char*)pRe->zInit, pRe->nInit)!=0)
223223
){
@@ -676,7 +676,7 @@ static const char *re_compile(
676676
int i, j;
677677

678678
*ppRe = 0;
679-
pRe = sqlite3_malloc( sizeof(*pRe) );
679+
pRe = sqlite3_malloc64( sizeof(*pRe) );
680680
if( pRe==0 ){
681681
return "out of memory";
682682
}
@@ -712,7 +712,7 @@ static const char *re_compile(
712712
/* The following is a performance optimization. If the regex begins with
713713
** ".*" (if the input regex lacks an initial "^") and afterwards there are
714714
** one or more matching characters, enter those matching characters into
715-
** zInit[]. The re_match() routine can then search ahead in the input
715+
** zInit[]. The re_match() routine can then search ahead in the input
716716
** string looking for the initial match without having to run the whole
717717
** regex engine over the string. Do not worry about trying to match
718718
** unicode characters beyond plane 0 - those are very rare and this is
@@ -828,7 +828,6 @@ static void re_bytecode_func(
828828
int i;
829829
int n;
830830
char *z;
831-
(void)argc;
832831
static const char *ReOpName[] = {
833832
"EOF",
834833
"MATCH",
@@ -851,6 +850,7 @@ static void re_bytecode_func(
851850
"ATSTART",
852851
};
853852

853+
(void)argc;
854854
zPattern = (const char*)sqlite3_value_text(argv[0]);
855855
if( zPattern==0 ) return;
856856
zErr = re_compile(&pRe, zPattern, re_maxnfa(re_maxlen(context)),
@@ -901,14 +901,14 @@ static void re_bytecode_func(
901901
#endif
902902
SQLITE_API
903903
int sqlite3_regexp_init(
904-
sqlite3 *db,
905-
char **pzErrMsg,
904+
sqlite3 *db,
905+
char **pzErrMsg,
906906
const sqlite3_api_routines *pApi
907907
){
908908
int rc = SQLITE_OK;
909909
SQLITE_EXTENSION_INIT2(pApi);
910910
(void)pzErrMsg; /* Unused */
911-
rc = sqlite3_create_function(db, "regexp", 2,
911+
rc = sqlite3_create_function(db, "regexp", 2,
912912
SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
913913
0, re_sql_func, 0, 0);
914914
if( rc==SQLITE_OK ){

src/rekeyvacuum.c

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
** Change 4: Call sqlite3mcBtreeSetPageSize instead of sqlite3BtreeSetPageSize for main database
2828
** (sqlite3mcBtreeSetPageSize allows to reduce the number of reserved bytes)
2929
**
30-
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.51.3 amalgamation.
30+
** This code is generated by the script rekeyvacuum.sh from SQLite version 3.53.0 amalgamation.
3131
*/
3232
SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
3333
char **pzErrMsg, /* Write error message here */
@@ -118,9 +118,19 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
118118
pDb = &db->aDb[nDb];
119119
assert( strcmp(pDb->zDbSName,zDbVacuum)==0 );
120120
pTemp = pDb->pBt;
121+
122+
/* A VACUUM cannot change the pagesize of an encrypted database. */
123+
if( db->nextPagesize ){
124+
extern void sqlite3mcCodecGetKey(sqlite3*, int, void**, int*);
125+
int nKey;
126+
char *zKey;
127+
sqlite3mcCodecGetKey(db, iDb, (void**)&zKey, &nKey);
128+
if( nKey ) db->nextPagesize = 0;
129+
}
121130
if( pOut ){
122131
sqlite3_file *id = sqlite3PagerFile(sqlite3BtreePager(pTemp));
123132
i64 sz = 0;
133+
const char *zFilename;
124134
if( id->pMethods!=0 && (sqlite3OsFileSize(id, &sz)!=SQLITE_OK || sz>0) ){
125135
rc = SQLITE_ERROR;
126136
sqlite3SetString(pzErrMsg, db, "output file already exists");
@@ -132,15 +142,14 @@ SQLITE_PRIVATE SQLITE_NOINLINE int sqlite3mcRunVacuumForRekey(
132142
** they are for the database being vacuumed, except that PAGER_CACHESPILL
133143
** is always set. */
134144
pgflags = db->aDb[iDb].safety_level | (db->flags & PAGER_FLAGS_MASK);
135-
}
136145

137-
/* A VACUUM cannot change the pagesize of an encrypted database. */
138-
if( db->nextPagesize ){
139-
extern void sqlite3mcCodecGetKey(sqlite3*, int, void**, int*);
140-
int nKey;
141-
char *zKey;
142-
sqlite3mcCodecGetKey(db, iDb, (void**)&zKey, &nKey);
143-
if( nKey ) db->nextPagesize = 0;
146+
/* If the VACUUM INTO target file is a URI filename and if the
147+
** "reserve=N" query parameter is present, reset the reserve to the
148+
** amount specified, if the amount is within range */
149+
zFilename = sqlite3BtreeGetFilename(pTemp);
150+
if( ALWAYS(zFilename) ){
151+
int nNew = (int)sqlite3_uri_int64(zFilename, "reserve", nRes);
152+
}
144153
}
145154

146155
sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);

src/series.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static int seriesConnect(
239239
rc = sqlite3_declare_vtab(db,
240240
"CREATE TABLE x(value,start hidden,stop hidden,step hidden)");
241241
if( rc==SQLITE_OK ){
242-
pNew = *ppVtab = sqlite3_malloc( sizeof(*pNew) );
242+
pNew = *ppVtab = sqlite3_malloc64( sizeof(*pNew) );
243243
if( pNew==0 ) return SQLITE_NOMEM;
244244
memset(pNew, 0, sizeof(*pNew));
245245
sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS);
@@ -261,7 +261,7 @@ static int seriesDisconnect(sqlite3_vtab *pVtab){
261261
static int seriesOpen(sqlite3_vtab *pUnused, sqlite3_vtab_cursor **ppCursor){
262262
series_cursor *pCur;
263263
(void)pUnused;
264-
pCur = sqlite3_malloc( sizeof(*pCur) );
264+
pCur = sqlite3_malloc64( sizeof(*pCur) );
265265
if( pCur==0 ) return SQLITE_NOMEM;
266266
memset(pCur, 0, sizeof(*pCur));
267267
*ppCursor = &pCur->base;

0 commit comments

Comments
 (0)