aboutsummaryrefslogtreecommitdiffstats
path: root/main/sqlite/CVE-2017-10989.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/sqlite/CVE-2017-10989.patch')
-rw-r--r--main/sqlite/CVE-2017-10989.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/sqlite/CVE-2017-10989.patch b/main/sqlite/CVE-2017-10989.patch
new file mode 100644
index 0000000000..b58fd64a19
--- /dev/null
+++ b/main/sqlite/CVE-2017-10989.patch
@@ -0,0 +1,15 @@
+diff --git a/sqlite3.c b/sqlite3.c
+index aaab200..dcaf732 100644
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -164546,6 +164546,10 @@ static int getNodeSize(
+ rc = getIntFromStmt(db, zSql, &pRtree->iNodeSize);
+ if( rc!=SQLITE_OK ){
+ *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db));
++ }else if( pRtree->iNodeSize<(512-64) ){
++ rc = SQLITE_CORRUPT;
++ *pzErr = sqlite3_mprintf("undersize RTree blobs in \"%q_node\"",
++ pRtree->zName);
+ }
+ }
+