1 Star 0 Fork 39

ethan848/sqlite

forked from src-openEuler/sqlite 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
6022-Fix-a-segfault-in-fts3-prompted-by-a-corrupted-datab.patch 1018 Bytes
Copy Edit Raw Blame History
hexiaowen authored 2019-09-30 11:17 . Package init
From 2fbabe31a19e10c68357884846454753ee2b4cc3 Mon Sep 17 00:00:00 2001
From: Dan Kennedy <danielk1977@gmail.com>
Date: Fri, 11 Jan 2019 21:34:25 +0000
Subject: [PATCH 0748/1009] Fix a segfault in fts3 prompted by a corrupted
database.
https://github.com/mackyle/sqlite/commit/2fbabe31a19e10c68357884846454753ee2b4cc3
---
ext/fts3/fts3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletion(-)
diff --git a/ext/fts3/fts3.c b/ext/fts3/fts3.c
index e168fae..5266749 100644
--- a/ext/fts3/fts3.c
+++ b/ext/fts3/fts3.c
@@ -2899,7 +2899,7 @@ static int fts3SegReaderCursor(
/* If zTerm is not NULL, and this segment is not stored entirely on its
** root node, the range of leaves scanned can be reduced. Do this. */
- if( iStartBlock && zTerm ){
+ if( iStartBlock && zTerm && zRoot ){
sqlite3_int64 *pi = (isPrefix ? &iLeavesEndBlock : 0);
rc = fts3SelectLeaf(p, zTerm, nTerm, zRoot, nRoot, &iStartBlock, pi);
if( rc!=SQLITE_OK ) goto finished;
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ethan848/sqlite.git
git@gitee.com:ethan848/sqlite.git
ethan848
sqlite
sqlite
master

Search