summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch')
-rw-r--r--meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch b/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch
deleted file mode 100644
index aac428c821..0000000000
--- a/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1Fix CVE-2017-13685
2
3The dump_callback function in SQLite 3.20.0 allows remote attackers to
4cause a denial of service (EXC_BAD_ACCESS and application crash) via a
5crafted file.
6
7References:
8https://sqlite.org/src/info/02f0f4c54f2819b3
9http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg105314.html
10
11Upstream-Status: Backport [https://sqlite.org/src/info/cf0d3715caac9149]
12
13CVE: CVE-2017-13685
14
15Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
16
17Index: src/shell.c
18==================================================================
19--- src/shell.c
20+++ src/shell.c
21@@ -2657,10 +2657,11 @@
22 int *aiType /* Column types */
23 ){
24 int i;
25 ShellState *p = (ShellState*)pArg;
26
27+ if( azArg==0 ) return 0;
28 switch( p->cMode ){
29 case MODE_Line: {
30 int w = 5;
31 if( azArg==0 ) break;
32 for(i=0; i<nArg; i++){
33@@ -3007,10 +3008,11 @@
34 */
35 static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
36 ShellText *p = (ShellText*)pArg;
37 int i;
38 UNUSED_PARAMETER(az);
39+ if( azArg==0 ) return 0;
40 if( p->n ) appendText(p, "|", 0);
41 for(i=0; i<nArg; i++){
42 if( i ) appendText(p, ",", 0);
43 if( azArg[i] ) appendText(p, azArg[i], 0);
44 }
45@@ -3888,11 +3890,11 @@
46 const char *zType;
47 const char *zSql;
48 ShellState *p = (ShellState *)pArg;
49
50 UNUSED_PARAMETER(azNotUsed);
51- if( nArg!=3 ) return 1;
52+ if( nArg!=3 || azArg==0 ) return 0;
53 zTable = azArg[0];
54 zType = azArg[1];
55 zSql = azArg[2];
56
57 if( strcmp(zTable, "sqlite_sequence")==0 ){