View | Details | Raw Unified | Return to bug 227365
Collapse All | Expand All

(-)databases/sqlite3/Makefile (-3 / +7 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/databases/sqlite3/Makefile 466648 2018-04-06 15:53:16Z jbeich $
2
# $FreeBSD: head/databases/sqlite3/Makefile 466648 2018-04-06 15:53:16Z jbeich $
3
3
4
PORTNAME=	sqlite3
4
PORTNAME=	sqlite3
5
DISTVERSION=	3.22.0
5
DISTVERSION=	3.23.0
6
PORTREVISION=	2
7
CATEGORIES=	databases
6
CATEGORIES=	databases
8
MASTER_SITES=	https://www.sqlite.org/2018/ http://www2.sqlite.org/2018/ http://www3.sqlite.org/2018/
7
MASTER_SITES=	https://www.sqlite.org/2018/ http://www2.sqlite.org/2018/ http://www3.sqlite.org/2018/
9
DISTNAME=	sqlite-autoconf-${PORTVERSION:C/\.([[:digit:]])[[:>:]]/0\1/g:S/.//g}00
8
DISTNAME=	sqlite-autoconf-${PORTVERSION:C/\.([[:digit:]])[[:>:]]/0\1/g:S/.//g}00
Lines 30-36 Link Here
30
OPTIONS_GROUP=		OPT_EXT OPT_FUNC UNICODE RTREEG RL
29
OPTIONS_GROUP=		OPT_EXT OPT_FUNC UNICODE RTREEG RL
31
30
32
OPTIONS_GROUP_OPT_EXT=	JSON1 SESSION
31
OPTIONS_GROUP_OPT_EXT=	JSON1 SESSION
33
OPTIONS_GROUP_OPT_FUNC=	OFFSET SOUNDEX
32
OPTIONS_GROUP_OPT_FUNC=	OFFSET SER1 SOUNDEX
34
33
35
OPT_EXT_DESC=		Optional extensions
34
OPT_EXT_DESC=		Optional extensions
36
OPT_FUNC_DESC=		Optional functions
35
OPT_FUNC_DESC=		Optional functions
Lines 52-57 Link Here
52
# http://www.sqlite.org/compile.html#enable_offset_sql_func
51
# http://www.sqlite.org/compile.html#enable_offset_sql_func
53
OFFSET_DESC=		Enable sqlite_offset() returning record's file offset
52
OFFSET_DESC=		Enable sqlite_offset() returning record's file offset
54
53
54
# https://www.sqlite.org/compile.html#enable_deserialize
55
SER1_DESC=		Enable the sqlite3_[de]serialize() interface
56
55
# https://www.sqlite.org/sessionintro.html
57
# https://www.sqlite.org/sessionintro.html
56
SESSION_DESC=		Enable the session extension
58
SESSION_DESC=		Enable the session extension
57
59
Lines 212-217 Link Here
212
214
213
OFFSET_CPPFLAGS=	-DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
215
OFFSET_CPPFLAGS=	-DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
214
216
217
SER1_CPPFLAGS=	-DSQLITE_ENABLE_DESERIALIZE=1
218
215
.include <bsd.port.options.mk>
219
.include <bsd.port.options.mk>
216
220
217
# Platform Configuration
221
# Platform Configuration
(-)databases/sqlite3/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1517654018
1
TIMESTAMP = 1523081283
2
SHA256 (sqlite-autoconf-3220000.tar.gz) = 2824ab1238b706bc66127320afbdffb096361130e23291f26928a027b885c612
2
SHA256 (sqlite-autoconf-3230000.tar.gz) = b7711a1800a071674c2bf76898ae8584fc6c9643cfe933cfc1bc54361e3a6e49
3
SIZE (sqlite-autoconf-3220000.tar.gz) = 2644649
3
SIZE (sqlite-autoconf-3230000.tar.gz) = 2674030
(-)databases/sqlite3/files/patch-sqlite3.c (-36 lines)
Lines 1-36 Link Here
1
Fix for CVE-2018-8740: https://nvd.nist.gov/vuln/detail/CVE-2018-8740
2
Detect databases whose schema is corrupted using a CREATE TABLE AS statement and issue an appropriate error message.
3
Commit [d75e6765]: https://www.sqlite.org/src/info/d75e67654aa9620b
4
Description: https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/1756349
5
6
--- sqlite3.c.orig	2018-03-22 07:08:21 UTC
7
+++ sqlite3.c
8
@@ -103474,8 +103474,6 @@ SQLITE_PRIVATE void sqlite3EndTable(
9
   p = pParse->pNewTable;
10
   if( p==0 ) return;
11
 
12
-  assert( !db->init.busy || !pSelect );
13
-
14
   /* If the db->init.busy is 1 it means we are reading the SQL off the
15
   ** "sqlite_master" or "sqlite_temp_master" table on the disk.
16
   ** So do not write to the disk again.  Extract the root page number
17
@@ -103486,6 +103484,10 @@ SQLITE_PRIVATE void sqlite3EndTable(
18
   ** table itself.  So mark it read-only.
19
   */
20
   if( db->init.busy ){
21
+    if( pSelect ){
22
+      sqlite3ErrorMsg(pParse, "");
23
+      return;
24
+    }
25
     p->tnum = db->init.newTnum;
26
     if( p->tnum==1 ) p->tabFlags |= TF_Readonly;
27
   }
28
@@ -117813,7 +117815,7 @@ static void corruptSchema(
29
     char *z;
30
     if( zObj==0 ) zObj = "?";
31
     z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj);
32
-    if( zExtra ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra);
33
+    if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra);
34
     sqlite3DbFree(db, *pData->pzErrMsg);
35
     *pData->pzErrMsg = z;
36
   }

Return to bug 227365