Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: third_party/sqlite/patches/0013-fts3-backport-Fix-out-of-scope-reference.patch

Issue 885473002: [sql] Rewrite sqlite patching "system". (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo in readme. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 --- ext/fts3/fts3_write.c.orig» 2012-05-08 21:05:03.000000000 +0300 1 From 2049b591163feaa885b482132ea2c769f5ff5a8d Mon Sep 17 00:00:00 2001
2 +++ ext/fts3/fts3_write.c» 2012-05-08 21:07:08.000000000 +0300 2 From: Evangelos Foutras <evangelos@foutrelis.com>
3 Date: Tue, 12 Jun 2012 18:13:09 +0000
4 Subject: [PATCH 13/23] [fts3][backport] Fix out-of-scope reference.
5
6 A pointer to a stack variable was being used after the variable's scope had
7 ended.
8
9 Upstream commit http://www.sqlite.org/src/info/f9c4a7c8f4
10
11 BUG=122525
12
13 Original review URL: https://chromiumcodereview.appspot.com/10387026
14 ---
15 third_party/sqlite/src/ext/fts3/fts3_write.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18 diff --git a/third_party/sqlite/src/ext/fts3/fts3_write.c b/third_party/sqlite/s rc/ext/fts3/fts3_write.c
19 index 1e71874..3636c7d 100644
20 --- a/third_party/sqlite/src/ext/fts3/fts3_write.c
21 +++ b/third_party/sqlite/src/ext/fts3/fts3_write.c
3 @@ -1238,13 +1238,13 @@ int sqlite3Fts3SegReaderPending( 22 @@ -1238,13 +1238,13 @@ int sqlite3Fts3SegReaderPending(
4 Fts3SegReader **ppReader /* OUT: SegReader for pending-terms */ 23 Fts3SegReader **ppReader /* OUT: SegReader for pending-terms */
5 ){ 24 ){
6 Fts3SegReader *pReader = 0; /* Fts3SegReader object to return */ 25 Fts3SegReader *pReader = 0; /* Fts3SegReader object to return */
7 + Fts3HashElem *pE; /* Iterator variable */ 26 + Fts3HashElem *pE; /* Iterator variable */
8 Fts3HashElem **aElem = 0; /* Array of term hash entries to scan */ 27 Fts3HashElem **aElem = 0; /* Array of term hash entries to scan */
9 int nElem = 0; /* Size of array at aElem */ 28 int nElem = 0; /* Size of array at aElem */
10 int rc = SQLITE_OK; /* Return Code */ 29 int rc = SQLITE_OK; /* Return Code */
11 30
12 if( isPrefix ){ 31 if( isPrefix ){
13 int nAlloc = 0; /* Size of allocated array at aElem */ 32 int nAlloc = 0; /* Size of allocated array at aElem */
14 - Fts3HashElem *pE = 0; /* Iterator variable */ 33 - Fts3HashElem *pE = 0; /* Iterator variable */
15 34
16 for(pE=fts3HashFirst(&p->pendingTerms); pE; pE=fts3HashNext(pE)){ 35 for(pE=fts3HashFirst(&p->pendingTerms); pE; pE=fts3HashNext(pE)){
17 char *zKey = (char *)fts3HashKey(pE); 36 char *zKey = (char *)fts3HashKey(pE);
18 @@ -1276,7 +1276,7 @@ int sqlite3Fts3SegReaderPending( 37 @@ -1276,7 +1276,7 @@ int sqlite3Fts3SegReaderPending(
19 } 38 }
20 39
21 }else{ 40 }else{
22 - Fts3HashElem *pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm); 41 - Fts3HashElem *pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
23 + pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm); 42 + pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
24 if( pE ){ 43 if( pE ){
25 aElem = &pE; 44 aElem = &pE;
26 nElem = 1; 45 nElem = 1;
46 --
47 2.2.1
48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698