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

Side by Side Diff: third_party/sqlite/sqlite-3.7.6.3-fix-out-of-scope-memory-reference.patch

Issue 10387026: Fix a problem in fts3_write.c causing stack memory to be referenced after it is out of scope (Closed)
Patch Set: Add contact information to the AUTHORS file Created 8 years, 6 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
« no previous file with comments | « third_party/sqlite/amalgamation/sqlite3.c ('k') | third_party/sqlite/src/ext/fts3/fts3_write.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 --- ext/fts3/fts3_write.c.orig 2012-05-08 21:05:03.000000000 +0300
2 +++ ext/fts3/fts3_write.c 2012-05-08 21:07:08.000000000 +0300
3 @@ -1238,13 +1238,13 @@ int sqlite3Fts3SegReaderPending(
4 Fts3SegReader **ppReader /* OUT: SegReader for pending-terms */
5 ){
6 Fts3SegReader *pReader = 0; /* Fts3SegReader object to return */
7 + Fts3HashElem *pE; /* Iterator variable */
8 Fts3HashElem **aElem = 0; /* Array of term hash entries to scan */
9 int nElem = 0; /* Size of array at aElem */
10 int rc = SQLITE_OK; /* Return Code */
11
12 if( isPrefix ){
13 int nAlloc = 0; /* Size of allocated array at aElem */
14 - Fts3HashElem *pE = 0; /* Iterator variable */
15
16 for(pE=fts3HashFirst(&p->pendingTerms); pE; pE=fts3HashNext(pE)){
17 char *zKey = (char *)fts3HashKey(pE);
18 @@ -1276,7 +1276,7 @@ int sqlite3Fts3SegReaderPending(
19 }
20
21 }else{
22 - Fts3HashElem *pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
23 + pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
24 if( pE ){
25 aElem = &pE;
26 nElem = 1;
OLDNEW
« no previous file with comments | « third_party/sqlite/amalgamation/sqlite3.c ('k') | third_party/sqlite/src/ext/fts3/fts3_write.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698