SQLite

Check-in [f298328771]
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
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f298328771d5aaba798d05f50c77ac239c7c72422ff35953463d6876a9659f74
User & Date: drh 2019-02-07 00:17:36.218
Context
2019-02-07
17:02
Version 3.27.0 (check-in: 97744701c3 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: f264015f84 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: f298328771 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: a505e34d4e user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/fuzzcheck.c.
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
  a = sqlite3_malloc64( nAlloc );
  if( a==0 ){
    fprintf(stderr, "Out of memory!\n");
    exit(1);
  }
  memset(a, 0, nAlloc);
  for(i=k=0; i<n; i++){
    char c = zIn[i];
    if( isxdigit(c) ){
      k++;
      if( k & 1 ){
        b = hexToInt(c)*16;
      }else{
        b += hexToInt(c);
        j = k/2 - 1;







|







529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
  a = sqlite3_malloc64( nAlloc );
  if( a==0 ){
    fprintf(stderr, "Out of memory!\n");
    exit(1);
  }
  memset(a, 0, nAlloc);
  for(i=k=0; i<n; i++){
    unsigned char c = (unsigned char)zIn[i];
    if( isxdigit(c) ){
      k++;
      if( k & 1 ){
        b = hexToInt(c)*16;
      }else{
        b += hexToInt(c);
        j = k/2 - 1;
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661

/*
** Run the SQL text
*/
static int runDbSql(sqlite3 *db, const char *zSql){
  int rc;
  sqlite3_stmt *pStmt;
  while( isspace(zSql[0]) ) zSql++;
  if( zSql[0]==0 ) return SQLITE_OK;
  if( eVerbosity>=4 ){
    printf("RUNNING-SQL: [%s]\n", zSql);
    fflush(stdout);
  }
  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
  if( rc==SQLITE_OK ){







|







647
648
649
650
651
652
653
654
655
656
657
658
659
660
661

/*
** Run the SQL text
*/
static int runDbSql(sqlite3 *db, const char *zSql){
  int rc;
  sqlite3_stmt *pStmt;
  while( isspace(zSql[0]&0x7f) ) zSql++;
  if( zSql[0]==0 ) return SQLITE_OK;
  if( eVerbosity>=4 ){
    printf("RUNNING-SQL: [%s]\n", zSql);
    fflush(stdout);
  }
  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
  if( rc==SQLITE_OK ){