Fossil

Check-in [3f487aca]
Login

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

Overview
Comment:Avoid the use of strcpy() as this upsets OpenBSD.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3f487aca8a2ff5a29f6d3adece04879d09818b7d
User & Date: drh 2014-04-23 11:03:30
Context
2014-04-23
14:14
Add option -W|--width to "fossil stash ls" and "fossil leaves" commands. check-in: fa6ece72 user: jan.nijtmans tags: trunk
11:03
Avoid the use of strcpy() as this upsets OpenBSD. check-in: 3f487aca user: drh tags: trunk
2014-04-22
17:22
Reword the message printed on the /info page when the UUID is not found and is less than 4 characters. check-in: 36ffa749 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/name.c.

735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
    for(i=0; zUuid[i]==zPrev[i] && zUuid[i]!=0; i++){}
    if( i>=minSize ){
      db_bind_int(&ins, ":cnt", i);
      db_bind_text(&ins, ":uuid", zUuid);
      db_step(&ins);
      db_reset(&ins);
    }
    strcpy(zPrev, zUuid);
  }
  db_finalize(&ins);
  db_finalize(&q);
  db_prepare(&q, "SELECT uuid FROM dups ORDER BY length(uuid) DESC, uuid");
  while( db_step(&q)==SQLITE_ROW ){
    fossil_print("%s\n", db_column_text(&q, 0));
  }
  db_finalize(&q);
}







|









735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
    for(i=0; zUuid[i]==zPrev[i] && zUuid[i]!=0; i++){}
    if( i>=minSize ){
      db_bind_int(&ins, ":cnt", i);
      db_bind_text(&ins, ":uuid", zUuid);
      db_step(&ins);
      db_reset(&ins);
    }
    sqlite3_snprintf(sizeof(zPrev), zPrev, "%s", zUuid);
  }
  db_finalize(&ins);
  db_finalize(&q);
  db_prepare(&q, "SELECT uuid FROM dups ORDER BY length(uuid) DESC, uuid");
  while( db_step(&q)==SQLITE_ROW ){
    fossil_print("%s\n", db_column_text(&q, 0));
  }
  db_finalize(&q);
}