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

Unified Diff: third_party/sqlite/src/ext/misc/fuzzer.c

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/sqlite/src/ext/misc/eval.c ('k') | third_party/sqlite/src/ext/misc/ieee754.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/misc/fuzzer.c
diff --git a/third_party/sqlite/src/ext/misc/fuzzer.c b/third_party/sqlite/src/ext/misc/fuzzer.c
index fe41cda8c24ae3dfcd58b01f46fe075fbbcd00f9..3ed4b0a9772619fb76979c43ca957009a3c9e72a 100644
--- a/third_party/sqlite/src/ext/misc/fuzzer.c
+++ b/third_party/sqlite/src/ext/misc/fuzzer.c
@@ -342,7 +342,8 @@ static int fuzzerLoadOneRule(
rc = SQLITE_NOMEM;
}else{
memset(pRule, 0, sizeof(*pRule));
- pRule->zFrom = &pRule->zTo[nTo+1];
+ pRule->zFrom = pRule->zTo;
+ pRule->zFrom += nTo + 1;
pRule->nFrom = nFrom;
memcpy(pRule->zFrom, zFrom, nFrom+1);
memcpy(pRule->zTo, zTo, nTo+1);
@@ -875,7 +876,7 @@ static fuzzer_stem *fuzzerNewStem(
if( pNew==0 ) return 0;
memset(pNew, 0, sizeof(*pNew));
pNew->zBasis = (char*)&pNew[1];
- pNew->nBasis = (int)strlen(zWord);
+ pNew->nBasis = (fuzzer_len)strlen(zWord);
memcpy(pNew->zBasis, zWord, pNew->nBasis+1);
pRule = pCur->pVtab->pRule;
while( fuzzerSkipRule(pRule, pNew, pCur->iRuleset) ){
« no previous file with comments | « third_party/sqlite/src/ext/misc/eval.c ('k') | third_party/sqlite/src/ext/misc/ieee754.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698