SQLite

Check-in [29a00a05dd]
Login

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

Overview
Comment:Fix the filename normalization in the dbtotxt utility program.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 29a00a05dd40ff59be340969e1aca4fee41e092f2faa1cea85a3448265a83c2c
User & Date: drh 2018-12-27 13:52:45.972
Context
2018-12-27
15:36
Fix another problem in fts5 caused by a corrupt schema record. (check-in: ff45f9dd69 user: dan tags: trunk)
13:52
Fix the filename normalization in the dbtotxt utility program. (check-in: 29a00a05dd user: drh tags: trunk)
07:46
Fix a null-pointer dereference that could occur in fts5 with a corrupt database. (check-in: b0a49d5e6d user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/dbtotxt.c.
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
    if( pgsz<512 || (pgsz&(pgsz-1))!=0 ){
      fprintf(stderr, "Invalid page size in header: %d\n", pgsz);
      exit(1);
    }
  }
  zBaseName = zInputFile;
  for(i=0; zInputFile[i]; i++){
    if( zInputFile[i]=='/' && zInputFile[i+1]!=0 ) zBaseName = zInputFile+1;
  }
  printf("| size %d pagesize %d filename %s\n",(int)szFile,pgsz,zBaseName);
  for(i=0; i<szFile; i+=16){
    int got = (int)fread(aLine, 1, 16, in);
    if( got!=16 ){
      static int once = 1;
      if( once ){







|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
    if( pgsz<512 || (pgsz&(pgsz-1))!=0 ){
      fprintf(stderr, "Invalid page size in header: %d\n", pgsz);
      exit(1);
    }
  }
  zBaseName = zInputFile;
  for(i=0; zInputFile[i]; i++){
    if( zInputFile[i]=='/' && zInputFile[i+1]!=0 ) zBaseName = zInputFile+i+1;
  }
  printf("| size %d pagesize %d filename %s\n",(int)szFile,pgsz,zBaseName);
  for(i=0; i<szFile; i+=16){
    int got = (int)fread(aLine, 1, 16, in);
    if( got!=16 ){
      static int once = 1;
      if( once ){