Fossil SCM
Fossil crash when doing addremove/add/extras
Fixed
b733bba0b7319ef…
· opened 14 years, 11 months ago
- Type
- Code_Defect
- Priority
- —
- Severity
- Important
- Resolution
- Fixed
- Subsystem
- —
- Created
- May 5, 2011 7:55 p.m.
Fossil crashes when performing commands that involves checking new files (extras, addremove, add) within a checkout of a recently-rebuilt repo. This is on Windows 7 Ultimate x64.
If I use the last release ([047e06193b] 2011-04-13 12:05:18) I experience no issues.
anonymous claiming to be Ingo Koch added on 2011-05-05 21:08:24 UTC: The bug was introduced with version [53aef2dee1] in
int vfile_top_of_checkout(const char *zPath)
The mprintf is called without zPath. I added some debug output and saw that the first zFile contains a valid path but the second one contained garbage.
I don't know why it works for the first call, but the second crashes fossil under Windows.
Here is a correction:
Index: src/vfile.c
===================================================================
--- src/vfile.c
+++ src/vfile.c
@@ -301,15 +301,15 @@
*/
int vfile_top_of_checkout(const char *zPath){
char *zFile;
int fileFound = 0;
- zFile = mprintf("%s/_FOSSIL_");
+ zFile = mprintf("%s/_FOSSIL_",zPath);
fileFound = file_size(zFile)>=1024;
fossil_free(zFile);
if( !fileFound ){
- zFile = mprintf("%s/.fos");
+ zFile = mprintf("%s/.fos",zPath);
fileFound = file_size(zFile)>=1024;
fossil_free(zFile);
}
return fileFound;
}