mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Fix a problem with the filename normalizer in unix, discovered by dbsqlfuzz.
FossilOrigin-Name: ff1eca7fcdcbc550a5f23db9d85281e5373500912699a7c7ae54bc0df0547e26
This commit is contained in:
@@ -6361,7 +6361,8 @@ static int unixBackupDir(const char *z, int *pJ){
|
||||
int j = *pJ;
|
||||
int i;
|
||||
if( j<=0 ) return 0;
|
||||
for(i=j-1; ALWAYS(i>0) && z[i-1]!='/'; i--){}
|
||||
for(i=j-1; i>0 && z[i-1]!='/'; i--){}
|
||||
if( i==0 ) return 0;
|
||||
if( z[i]=='.' && i==j-2 && z[i+1]=='.' ) return 0;
|
||||
*pJ = i-1;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user