/ Check-in [f2983287]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In the fuzzcheck test program, make sure the isspace() and related routines are not given values outside the range of -1 to 255.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f298328771d5aaba798d05f50c77ac239c7c72422ff35953463d6876a9659f74
User & Date: drh 2019-02-07 00:17:36
Context
2019-02-07
17:02
Version 3.27.0 check-in: 97744701 user: drh tags: trunk, release, version-3.27.0
15:09
Experimental change to VACUUM so that it preserves existing ROWID values. Closed-Leaf check-in: f264015f user: drh tags: vacuum-preserves-rowid
00:17
In the fuzzcheck test program, make sure the isspace() and related routines are not given values outside the range of -1 to 255. check-in: f2983287 user: drh tags: trunk
2019-02-06
20:49
Ensure all bytes of the PgHdr1 structure are initialized. This avoids a valgrind error when running corruptI.test. check-in: a505e34d user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/fuzzcheck.c.

   529    529     a = sqlite3_malloc64( nAlloc );
   530    530     if( a==0 ){
   531    531       fprintf(stderr, "Out of memory!\n");
   532    532       exit(1);
   533    533     }
   534    534     memset(a, 0, nAlloc);
   535    535     for(i=k=0; i<n; i++){
   536         -    char c = zIn[i];
          536  +    unsigned char c = (unsigned char)zIn[i];
   537    537       if( isxdigit(c) ){
   538    538         k++;
   539    539         if( k & 1 ){
   540    540           b = hexToInt(c)*16;
   541    541         }else{
   542    542           b += hexToInt(c);
   543    543           j = k/2 - 1;
................................................................................
   647    647   
   648    648   /*
   649    649   ** Run the SQL text
   650    650   */
   651    651   static int runDbSql(sqlite3 *db, const char *zSql){
   652    652     int rc;
   653    653     sqlite3_stmt *pStmt;
   654         -  while( isspace(zSql[0]) ) zSql++;
          654  +  while( isspace(zSql[0]&0x7f) ) zSql++;
   655    655     if( zSql[0]==0 ) return SQLITE_OK;
   656    656     if( eVerbosity>=4 ){
   657    657       printf("RUNNING-SQL: [%s]\n", zSql);
   658    658       fflush(stdout);
   659    659     }
   660    660     rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
   661    661     if( rc==SQLITE_OK ){