Overview
SHA1 Hash: | af3a751841e268336fea30c2d6499c2d85e6d71e |
---|---|
Date: | 2007-09-25 00:17:39 |
User: | jnc |
Comment: | When checking for win32 absolute paths, I added a check to make sure we don't overstep the bounds of a string |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/file.c from [18cdda54a2] to [525e8c0661].
@@ -182,11 +182,12 @@ ** 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]=='\\') ){ + 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 ){