Skip to content

Commit 340f146

Browse files
committed
Snapshot of upstream SQLite 3.41.2
1 parent c1b1742 commit 340f146

31 files changed

+373
-97
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.41.1
1+
3.41.2

autoconf/tea/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dnl to configure the system for the local environment.
1919
# so that we create the export library with the dll.
2020
#-----------------------------------------------------------------------
2121

22-
AC_INIT([sqlite],[3.41.0])
22+
AC_INIT([sqlite],[3.41.2])
2323

2424
#--------------------------------------------------------------------
2525
# Call TEA_INIT as the first TEA_ macro to set up initial vars.

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for sqlite 3.41.1.
3+
# Generated by GNU Autoconf 2.69 for sqlite 3.41.2.
44
#
55
#
66
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ MAKEFLAGS=
726726
# Identity of this package.
727727
PACKAGE_NAME='sqlite'
728728
PACKAGE_TARNAME='sqlite'
729-
PACKAGE_VERSION='3.41.1'
730-
PACKAGE_STRING='sqlite 3.41.1'
729+
PACKAGE_VERSION='3.41.2'
730+
PACKAGE_STRING='sqlite 3.41.2'
731731
PACKAGE_BUGREPORT=''
732732
PACKAGE_URL=''
733733

@@ -1470,7 +1470,7 @@ if test "$ac_init_help" = "long"; then
14701470
# Omit some internal or obsolete options to make the list less imposing.
14711471
# This message is too long to be a string in the A/UX 3.1 sh.
14721472
cat <<_ACEOF
1473-
\`configure' configures sqlite 3.41.1 to adapt to many kinds of systems.
1473+
\`configure' configures sqlite 3.41.2 to adapt to many kinds of systems.
14741474
14751475
Usage: $0 [OPTION]... [VAR=VALUE]...
14761476
@@ -1535,7 +1535,7 @@ fi
15351535

15361536
if test -n "$ac_init_help"; then
15371537
case $ac_init_help in
1538-
short | recursive ) echo "Configuration of sqlite 3.41.1:";;
1538+
short | recursive ) echo "Configuration of sqlite 3.41.2:";;
15391539
esac
15401540
cat <<\_ACEOF
15411541
@@ -1665,7 +1665,7 @@ fi
16651665
test -n "$ac_init_help" && exit $ac_status
16661666
if $ac_init_version; then
16671667
cat <<\_ACEOF
1668-
sqlite configure 3.41.1
1668+
sqlite configure 3.41.2
16691669
generated by GNU Autoconf 2.69
16701670
16711671
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2084,7 +2084,7 @@ cat >config.log <<_ACEOF
20842084
This file contains any messages produced by compilers while
20852085
running configure, to aid debugging if configure makes a mistake.
20862086
2087-
It was created by sqlite $as_me 3.41.1, which was
2087+
It was created by sqlite $as_me 3.41.2, which was
20882088
generated by GNU Autoconf 2.69. Invocation command line was
20892089
20902090
$ $0 $@
@@ -12457,7 +12457,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1245712457
# report actual input values of CONFIG_FILES etc. instead of their
1245812458
# values after options handling.
1245912459
ac_log="
12460-
This file was extended by sqlite $as_me 3.41.1, which was
12460+
This file was extended by sqlite $as_me 3.41.2, which was
1246112461
generated by GNU Autoconf 2.69. Invocation command line was
1246212462
1246312463
CONFIG_FILES = $CONFIG_FILES
@@ -12523,7 +12523,7 @@ _ACEOF
1252312523
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1252412524
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1252512525
ac_cs_version="\\
12526-
sqlite config.status 3.41.1
12526+
sqlite config.status 3.41.2
1252712527
configured by $0, generated by GNU Autoconf 2.69,
1252812528
with options \\"\$ac_cs_config\\"
1252912529

ext/fts3/fts3_write.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2667,16 +2667,18 @@ static int fts3MsrBufferData(
26672667
char *pList,
26682668
i64 nList
26692669
){
2670-
if( nList>pMsr->nBuffer ){
2670+
if( (nList+FTS3_NODE_PADDING)>pMsr->nBuffer ){
26712671
char *pNew;
2672-
pMsr->nBuffer = nList*2;
2673-
pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, pMsr->nBuffer);
2672+
int nNew = nList*2 + FTS3_NODE_PADDING;
2673+
pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, nNew);
26742674
if( !pNew ) return SQLITE_NOMEM;
26752675
pMsr->aBuffer = pNew;
2676+
pMsr->nBuffer = nNew;
26762677
}
26772678

26782679
assert( nList>0 );
26792680
memcpy(pMsr->aBuffer, pList, nList);
2681+
memset(&pMsr->aBuffer[nList], 0, FTS3_NODE_PADDING);
26802682
return SQLITE_OK;
26812683
}
26822684

ext/recover/dbdata.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,14 @@ static int dbdataNext(sqlite3_vtab_cursor *pCursor){
512512
if( pCsr->bOnePage==0 && pCsr->iPgno>pCsr->szDb ) return SQLITE_OK;
513513
rc = dbdataLoadPage(pCsr, pCsr->iPgno, &pCsr->aPage, &pCsr->nPage);
514514
if( rc!=SQLITE_OK ) return rc;
515-
if( pCsr->aPage ) break;
515+
if( pCsr->aPage && pCsr->nPage>=256 ) break;
516+
sqlite3_free(pCsr->aPage);
517+
pCsr->aPage = 0;
516518
if( pCsr->bOnePage ) return SQLITE_OK;
517519
pCsr->iPgno++;
518520
}
521+
522+
assert( iOff+3+2<=pCsr->nPage );
519523
pCsr->iCell = pTab->bPtr ? -2 : 0;
520524
pCsr->nCell = get_uint16(&pCsr->aPage[iOff+3]);
521525
}
@@ -750,8 +754,7 @@ static int dbdataGetEncoding(DbdataCursor *pCsr){
750754
int nPg1 = 0;
751755
u8 *aPg1 = 0;
752756
rc = dbdataLoadPage(pCsr, 1, &aPg1, &nPg1);
753-
assert( rc!=SQLITE_OK || nPg1==0 || nPg1>=512 );
754-
if( rc==SQLITE_OK && nPg1>0 ){
757+
if( rc==SQLITE_OK && nPg1>=(56+4) ){
755758
pCsr->enc = get_uint32(&aPg1[56]);
756759
}
757760
sqlite3_free(aPg1);

0 commit comments

Comments
 (0)