/ Check-in [29a00a05]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:29a00a05dd40ff59be340969e1aca4fee41e092f2faa1cea85a3448265a83c2c
User & Date: drh 2018-12-27 13:52:45
Context
2018-12-27
15:36
Fix another problem in fts5 caused by a corrupt schema record. check-in: ff45f9dd user: dan tags: trunk
13:52
Fix the filename normalization in the dbtotxt utility program. check-in: 29a00a05 user: drh tags: trunk
07:46
Fix a null-pointer dereference that could occur in fts5 with a corrupt database. check-in: b0a49d5e user: dan tags: trunk
Changes
Hide Diffs Unified Diffs 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 ){