Fossil

Check-in [af3a751841]
Login

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

Overview
Comment:When checking for win32 absolute paths, I added a check to make sure we don't overstep the bounds of a string
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: af3a751841e268336fea30c2d6499c2d85e6d71e
User & Date: jnc 2007-09-25 00:17:39.000
Context
2007-09-25
01:02
Timeline and Leaves on TTY now marks with *...* (vs [...]) you current working revision check-in: 2db88ec639 user: jnc tags: trunk
00:17
When checking for win32 absolute paths, I added a check to make sure we don't overstep the bounds of a string check-in: af3a751841 user: jnc tags: trunk
2007-09-24
23:58
Merged mjanssen's timeline updates check-in: 798a48ee46 user: jnc tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/file.c.
180
181
182
183
184
185
186
187

188
189
190
191
192
193
194
** Compute a canonical pathname for a file or directory.
** Make the name absolute if it is relative.
** Remove redundant / characters
** Remove all /./ path elements.
** Convert /A/../ to just /
*/
void file_canonical_name(const char *zOrigName, Blob *pOut){
  if( zOrigName[0]=='/' || (zOrigName[1]==':' && zOrigName[2]=='\\') ){

    blob_set(pOut, zOrigName);
    blob_materialize(pOut);
  }else{
    char zPwd[2000];
    if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
      fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20);
      exit(1);







|
>







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
** Compute a canonical pathname for a file or directory.
** Make the name absolute if it is relative.
** Remove redundant / characters
** Remove all /./ path elements.
** Convert /A/../ to just /
*/
void file_canonical_name(const char *zOrigName, Blob *pOut){
  if( zOrigName[0]=='/' 
      || (strlen(zOrigName)>3 && zOrigName[1]==':' && zOrigName[2]=='\\') ){
    blob_set(pOut, zOrigName);
    blob_materialize(pOut);
  }else{
    char zPwd[2000];
    if( getcwd(zPwd, sizeof(zPwd)-20)==0 ){
      fprintf(stderr, "pwd too big: max %d\n", sizeof(zPwd)-20);
      exit(1);