Fossil SCM
Error in file_tempname
Fixed
006e1df642d6246…
· opened 14 years, 9 months ago
- Type
- Code_Defect
- Priority
- —
- Severity
- Critical
- Resolution
- Fixed
- Subsystem
- —
- Created
- June 17, 2011 10:54 a.m.
When "gdiff-command" settings is not empty, Fossil is hungup in
fossil gdiff -r revision --to revision filename
Error in file.c, in file_tempname function. Piece of diff in file.c:
/* Check that the output buffer is large enough for the temporary file
@@ -653,11 +656,11 @@
sqlite3_randomness(15, &zBuf[j]);
for(i=0; i<15; i++, j++){
zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
}
zBuf[j] = 0;
- }while( access(zBuf,0)==0 );
+ }while( file_size(zBuf)<0 );
}
Must be
while( file_size(zBuf)>=0 );