Artifact [81765bbaba]
Not logged in

Artifact 81765bbaba1d882ad47eea3f62a5d96e98742550:

Ticket change [81765bbaba] - Ticket [b733bba0b7] Fossil crash when doing addremove/add/extras status still Open with 3 other changes by anonymous 2011-05-05 21:08:24.
D 2011-05-05T21:08:24.871
J +comment \n\n<hr\s/><i>anonymous\sclaiming\sto\sbe\sIngo\sKoch\sadded\son\s2011-05-05\s21:08:24\sUTC:</i><br\s/>\nThe\sbug\swas\sintroduced\swith\sversion\s[53aef2dee1]\sin\s\s\r\n<verbatim>int\svfile_top_of_checkout(const\schar\s*zPath)</verbatim>\r\n\r\nThe\smprintf\sis\scalled\swithout\szPath.\sI\sadded\ssome\sdebug\soutput\sand\ssaw\sthat\sthe\sfirst\szFile\scontains\sa\svalid\spath\sbut\sthe\ssecond\sone\scontained\sgarbage.\r\n\r\nI\sdon't\sknow\swhy\sit\sworks\sfor\sthe\sfirst\scall,\sbut\sthe\ssecond\scrashes\sfossil\sunder\sWindows.\r\n\r\nHere\sis\sa\scorrection:\r\n<verbatim>\r\nIndex:\ssrc/vfile.c\r\n===================================================================\r\n---\ssrc/vfile.c\r\n+++\ssrc/vfile.c\r\n@@\s-301,15\s+301,15\s@@\r\n\s*/\r\n\sint\svfile_top_of_checkout(const\schar\s*zPath){\r\n\s\s\schar\s*zFile;\r\n\s\s\sint\sfileFound\s=\s0;\r\n\s\r\n-\s\szFile\s=\smprintf("%s/_FOSSIL_");\r\n+\s\szFile\s=\smprintf("%s/_FOSSIL_",zPath);\r\n\s\s\sfileFound\s=\sfile_size(zFile)>=1024;\r\n\s\s\sfossil_free(zFile);\r\n\s\s\sif(\s!fileFound\s){\r\n-\s\s\s\szFile\s=\smprintf("%s/.fos");\r\n+\s\s\s\szFile\s=\smprintf("%s/.fos",zPath);\r\n\s\s\s\s\sfileFound\s=\sfile_size(zFile)>=1024;\r\n\s\s\s\s\sfossil_free(zFile);\r\n\s\s\s}\r\n\s\s\sreturn\sfileFound;\r\n\s}\r\n</verbatim>
J resolution Open
J type Code_Defect
K b733bba0b7319ef2dc9d74526dab7eec29460fcd
U anonymous
Z e34c61547c99c76d88750acacf8441da