summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-12 18:13:09 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-12 18:13:09 +0000
commit46d044d81071a4779c09678eb9b7d2cf7aa9844c (patch)
tree020e60f3d6ab3d97bdba3ca8a6de413e4b4f5a23 /third_party
parent79a207b4aa12da7efca0aadd999657d8bf6e788a (diff)
downloadchromium_src-46d044d81071a4779c09678eb9b7d2cf7aa9844c.zip
chromium_src-46d044d81071a4779c09678eb9b7d2cf7aa9844c.tar.gz
chromium_src-46d044d81071a4779c09678eb9b7d2cf7aa9844c.tar.bz2
Upstream commit in trunk:
http://www.sqlite.org/src/info/f9c4a7c8f4 Upstream commits in branch-3.7.6: http://www.sqlite.org/src/info/a61786e760 (third hunk) http://www.sqlite.org/src/info/e6a04bf9f1 (correction) I have left out the comment addition seen in the trunk commit, because the backport to the 3.7.6 branch doesn't include it. [Patch from Evangelos Foutras <evangelos@foutrelis.com> ] BUG=122525 TEST=distros using gcc4.7 shouldn't crash. see bug. R=shess@chromium.org Review URL: https://chromiumcodereview.appspot.com/10387026 Patch from Evangelos Foutras <evangelos@foutrelis.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/sqlite/README.chromium2
-rw-r--r--third_party/sqlite/amalgamation/sqlite3.c4
-rw-r--r--third_party/sqlite/sqlite-3.7.6.3-fix-out-of-scope-memory-reference.patch26
-rw-r--r--third_party/sqlite/src/ext/fts3/fts3_write.c4
4 files changed, 32 insertions, 4 deletions
diff --git a/third_party/sqlite/README.chromium b/third_party/sqlite/README.chromium
index 7b102dd..7899713 100644
--- a/third_party/sqlite/README.chromium
+++ b/third_party/sqlite/README.chromium
@@ -70,6 +70,7 @@ webdb.patch
test.patch
mac_time_machine.patch
system-sqlite.patch
+sqlite-3.7.6.3-fix-out-of-scope-memory-reference.patch
So, e.g. you could do this to apply all our patches to vanilla SQLite:
@@ -84,6 +85,7 @@ patch -p0 < ../sqlite/webdb.patch
patch -p0 < ../sqlite/test.patch
patch -p0 < ../sqlite/mac_time_machine.patch
patch -p0 < ../sqlite/system-sqlite.patch
+patch -p0 < ../sqlite/sqlite-3.7.6.3-fix-out-of-scope-memory-reference.patch
This will only be the case if all changes we make also update the corresponding
patch files. Therefore please remember to do that whenever you make a change!
diff --git a/third_party/sqlite/amalgamation/sqlite3.c b/third_party/sqlite/amalgamation/sqlite3.c
index 9c66c16..780d233 100644
--- a/third_party/sqlite/amalgamation/sqlite3.c
+++ b/third_party/sqlite/amalgamation/sqlite3.c
@@ -119149,13 +119149,13 @@ SQLITE_PRIVATE int sqlite3Fts3SegReaderPending(
Fts3SegReader **ppReader /* OUT: SegReader for pending-terms */
){
Fts3SegReader *pReader = 0; /* Fts3SegReader object to return */
+ Fts3HashElem *pE; /* Iterator variable */
Fts3HashElem **aElem = 0; /* Array of term hash entries to scan */
int nElem = 0; /* Size of array at aElem */
int rc = SQLITE_OK; /* Return Code */
if( isPrefix ){
int nAlloc = 0; /* Size of allocated array at aElem */
- Fts3HashElem *pE = 0; /* Iterator variable */
for(pE=fts3HashFirst(&p->pendingTerms); pE; pE=fts3HashNext(pE)){
char *zKey = (char *)fts3HashKey(pE);
@@ -119187,7 +119187,7 @@ SQLITE_PRIVATE int sqlite3Fts3SegReaderPending(
}
}else{
- Fts3HashElem *pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
+ pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
if( pE ){
aElem = &pE;
nElem = 1;
diff --git a/third_party/sqlite/sqlite-3.7.6.3-fix-out-of-scope-memory-reference.patch b/third_party/sqlite/sqlite-3.7.6.3-fix-out-of-scope-memory-reference.patch
new file mode 100644
index 0000000..a5b031b
--- /dev/null
+++ b/third_party/sqlite/sqlite-3.7.6.3-fix-out-of-scope-memory-reference.patch
@@ -0,0 +1,26 @@
+--- ext/fts3/fts3_write.c.orig 2012-05-08 21:05:03.000000000 +0300
++++ ext/fts3/fts3_write.c 2012-05-08 21:07:08.000000000 +0300
+@@ -1238,13 +1238,13 @@ int sqlite3Fts3SegReaderPending(
+ Fts3SegReader **ppReader /* OUT: SegReader for pending-terms */
+ ){
+ Fts3SegReader *pReader = 0; /* Fts3SegReader object to return */
++ Fts3HashElem *pE; /* Iterator variable */
+ Fts3HashElem **aElem = 0; /* Array of term hash entries to scan */
+ int nElem = 0; /* Size of array at aElem */
+ int rc = SQLITE_OK; /* Return Code */
+
+ if( isPrefix ){
+ int nAlloc = 0; /* Size of allocated array at aElem */
+- Fts3HashElem *pE = 0; /* Iterator variable */
+
+ for(pE=fts3HashFirst(&p->pendingTerms); pE; pE=fts3HashNext(pE)){
+ char *zKey = (char *)fts3HashKey(pE);
+@@ -1276,7 +1276,7 @@ int sqlite3Fts3SegReaderPending(
+ }
+
+ }else{
+- Fts3HashElem *pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
++ pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
+ if( pE ){
+ aElem = &pE;
+ nElem = 1;
diff --git a/third_party/sqlite/src/ext/fts3/fts3_write.c b/third_party/sqlite/src/ext/fts3/fts3_write.c
index 1e71874..3636c7d 100644
--- a/third_party/sqlite/src/ext/fts3/fts3_write.c
+++ b/third_party/sqlite/src/ext/fts3/fts3_write.c
@@ -1238,13 +1238,13 @@ int sqlite3Fts3SegReaderPending(
Fts3SegReader **ppReader /* OUT: SegReader for pending-terms */
){
Fts3SegReader *pReader = 0; /* Fts3SegReader object to return */
+ Fts3HashElem *pE; /* Iterator variable */
Fts3HashElem **aElem = 0; /* Array of term hash entries to scan */
int nElem = 0; /* Size of array at aElem */
int rc = SQLITE_OK; /* Return Code */
if( isPrefix ){
int nAlloc = 0; /* Size of allocated array at aElem */
- Fts3HashElem *pE = 0; /* Iterator variable */
for(pE=fts3HashFirst(&p->pendingTerms); pE; pE=fts3HashNext(pE)){
char *zKey = (char *)fts3HashKey(pE);
@@ -1276,7 +1276,7 @@ int sqlite3Fts3SegReaderPending(
}
}else{
- Fts3HashElem *pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
+ pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
if( pE ){
aElem = &pE;
nElem = 1;