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

Side by Side Diff: third_party/sqlite/src/ext/misc/fuzzer.c

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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/src/ext/misc/csv.c ('k') | third_party/sqlite/src/ext/misc/json1.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** 2011 March 24 2 ** 2011 March 24
3 ** 3 **
4 ** The author disclaims copyright to this source code. In place of 4 ** The author disclaims copyright to this source code. In place of
5 ** a legal notice, here is a blessing: 5 ** a legal notice, here is a blessing:
6 ** 6 **
7 ** May you do good and not evil. 7 ** May you do good and not evil.
8 ** May you find forgiveness for yourself and forgive others. 8 ** May you find forgiveness for yourself and forgive others.
9 ** May you share freely, never taking more than you give. 9 ** May you share freely, never taking more than you give.
10 ** 10 **
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 rc = SQLITE_ERROR; 337 rc = SQLITE_ERROR;
338 }else{ 338 }else{
339 339
340 pRule = sqlite3_malloc( sizeof(*pRule) + nFrom + nTo ); 340 pRule = sqlite3_malloc( sizeof(*pRule) + nFrom + nTo );
341 if( pRule==0 ){ 341 if( pRule==0 ){
342 rc = SQLITE_NOMEM; 342 rc = SQLITE_NOMEM;
343 }else{ 343 }else{
344 memset(pRule, 0, sizeof(*pRule)); 344 memset(pRule, 0, sizeof(*pRule));
345 pRule->zFrom = pRule->zTo; 345 pRule->zFrom = pRule->zTo;
346 pRule->zFrom += nTo + 1; 346 pRule->zFrom += nTo + 1;
347 pRule->nFrom = nFrom; 347 pRule->nFrom = (fuzzer_len)nFrom;
348 memcpy(pRule->zFrom, zFrom, nFrom+1); 348 memcpy(pRule->zFrom, zFrom, nFrom+1);
349 memcpy(pRule->zTo, zTo, nTo+1); 349 memcpy(pRule->zTo, zTo, nTo+1);
350 pRule->nTo = nTo; 350 pRule->nTo = (fuzzer_len)nTo;
351 pRule->rCost = nCost; 351 pRule->rCost = nCost;
352 pRule->iRuleset = (int)iRuleset; 352 pRule->iRuleset = (int)iRuleset;
353 } 353 }
354 } 354 }
355 355
356 *ppRule = pRule; 356 *ppRule = pRule;
357 return rc; 357 return rc;
358 } 358 }
359 359
360 /* 360 /*
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 char **pzErrMsg, 1176 char **pzErrMsg,
1177 const sqlite3_api_routines *pApi 1177 const sqlite3_api_routines *pApi
1178 ){ 1178 ){
1179 int rc = SQLITE_OK; 1179 int rc = SQLITE_OK;
1180 SQLITE_EXTENSION_INIT2(pApi); 1180 SQLITE_EXTENSION_INIT2(pApi);
1181 #ifndef SQLITE_OMIT_VIRTUALTABLE 1181 #ifndef SQLITE_OMIT_VIRTUALTABLE
1182 rc = sqlite3_create_module(db, "fuzzer", &fuzzerModule, 0); 1182 rc = sqlite3_create_module(db, "fuzzer", &fuzzerModule, 0);
1183 #endif 1183 #endif
1184 return rc; 1184 return rc;
1185 } 1185 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/ext/misc/csv.c ('k') | third_party/sqlite/src/ext/misc/json1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698