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

Side by Side Diff: third_party/sqlite/safe-tolower.patch

Issue 186011: Merge 25141 - Fix issue 15261: Crash in history::TextDatabase::GetTextMatches... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/ext/fts3/fts3_tokenizer1.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/third_party/sqlite/safe-tolower.patch:r25141
OLDNEW
1 This patch removes the usage of tolower() in fts code, which is not locale 1 This patch removes the usage of tolower() in fts code, which is not locale
2 neutral and causes problem in some locales such as Turkish. 2 neutral and causes problem in some locales such as Turkish.
3 See http://crbug.com/15261 for details. 3 See http://crbug.com/15261 for details.
4 An upstream ticket was also created for this issue: 4 An upstream ticket was also created for this issue:
5 http://www.sqlite.org/src/tktview/991789d9f3136a0460dc83a33e815c1aa9757c26 5 http://www.sqlite.org/src/tktview/991789d9f3136a0460dc83a33e815c1aa9757c26
6 6
7 Index: ext/fts3/fts3.c 7 Index: ext/fts3/fts3.c
8 =================================================================== 8 ===================================================================
9 --- ext/fts3/fts3.c (revision 24387) 9 --- ext/fts3/fts3.c (revision 24387)
10 +++ ext/fts3/fts3.c (working copy) 10 +++ ext/fts3/fts3.c (working copy)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 +++ ext/fts2/fts2_tokenizer1.c (working copy) 88 +++ ext/fts2/fts2_tokenizer1.c (working copy)
89 @@ -191,7 +191,7 @@ 89 @@ -191,7 +191,7 @@
90 ** case-insensitivity. 90 ** case-insensitivity.
91 */ 91 */
92 unsigned char ch = p[iStartOffset+i]; 92 unsigned char ch = p[iStartOffset+i];
93 - c->pToken[i] = ch<0x80 ? tolower(ch) : ch; 93 - c->pToken[i] = ch<0x80 ? tolower(ch) : ch;
94 + c->pToken[i] = (ch>='A' && ch<='Z') ? (ch-'A'+'a') : ch; 94 + c->pToken[i] = (ch>='A' && ch<='Z') ? (ch-'A'+'a') : ch;
95 } 95 }
96 *ppToken = c->pToken; 96 *ppToken = c->pToken;
97 *pnBytes = n; 97 *pnBytes = n;
OLDNEW
« no previous file with comments | « third_party/sqlite/ext/fts3/fts3_tokenizer1.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698