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

Unified Diff: third_party/sqlite/sqlite-src-3080704/ext/fts2/fts2_icu.c

Issue 883353008: [sql] Import reference version of SQLite 3.8.7.4. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hold back encoding change which is messing up patch. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/sqlite-src-3080704/ext/fts2/fts2_icu.c
diff --git a/third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c b/third_party/sqlite/sqlite-src-3080704/ext/fts2/fts2_icu.c
similarity index 98%
copy from third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c
copy to third_party/sqlite/sqlite-src-3080704/ext/fts2/fts2_icu.c
index de8e116bb906c59ef5352f6b39973399427621d1..2670301f5198f3712b2afb9b87d5a45e80059201 100644
--- a/third_party/sqlite/sqlite-src-3070603/ext/fts2/fts2_icu.c
+++ b/third_party/sqlite/sqlite-src-3080704/ext/fts2/fts2_icu.c
@@ -118,7 +118,7 @@ static int icuOpen(
nChar = nInput+1;
pCsr = (IcuCursor *)sqlite3_malloc(
sizeof(IcuCursor) + /* IcuCursor */
- nChar * sizeof(UChar) + /* IcuCursor.aChar[] */
+ ((nChar+3)&~3) * sizeof(UChar) + /* IcuCursor.aChar[] */
(nChar+1) * sizeof(int) /* IcuCursor.aOffset[] */
);
if( !pCsr ){
@@ -126,7 +126,7 @@ static int icuOpen(
}
memset(pCsr, 0, sizeof(IcuCursor));
pCsr->aChar = (UChar *)&pCsr[1];
- pCsr->aOffset = (int *)&pCsr->aChar[nChar];
+ pCsr->aOffset = (int *)&pCsr->aChar[(nChar+3)&~3];
pCsr->aOffset[iOut] = iInput;
U8_NEXT(zInput, iInput, nInput, c);

Powered by Google App Engine
This is Rietveld 408576698