Artifact [5564f15d6c]
Not logged in

Artifact 5564f15d6c9823b8cf5c37986ce9e374d8ba8f64:

Ticket change [5564f15d6c] - New ticket [be56c89def] Manifest parser bug causes fossil push to fail if a file look like a manifest but isn't one. by anonymous 2010-10-16 10:49:17.
D 2010-10-16T10:49:17
J comment The\sbug\scan\sbe\sreproduced\swith\sthe\sfollowing\ssteps:\r\n\r\n1.\screate\san\sempty\srepository\r\n\r\n\r\n2.\sclone\sit\r\n\r\n3.\sopen\sit\r\n\r\n4.\sCreate\sa\stext\sfile\scontaining\s"C\sblabla"\sand\smake\ssure\sit\sdoesn't\send\swith\sa\snewline\scharacter\r\n\r\n5.\scommit\sit\r\n\r\n6.\sTry\sto\spush\sit:\sit\sshould\sfail\swith\s"bad\scommand"\sfollowed\sby\ssome\sstuff.\r\n\r\nThe\sbug\sis\scaused\sby\sthe\smanifest\sparser\swhich\sacts\sin\sa\sdestructive\sway:\swhen\sit\sparses\sa\scard,\sit\suses\sblob_terminate\swhich\smodifies\sthe\soriginal\sbuffer,\seven\sif\sit\sturns\sout\safterwards\sthat\sthe\sfile\sisn't\sactually\sa\smanifest\s(in\smy\scase\sit\swas\sjust\sa\ssmall\sbinary\sfile\swhich\shappened\sto\sbegin\swith\sC\sand\sa\stabulation\scharacter),\swhich\soverwrite\swhat's\snext\s(in\sthis\scase\sit\soverwrites\sthe\sfirst\scharacter\sof\sthe\sfollowing\sfile\scard\sof\sthe\sxfer\sstream,\swhich\sconfuses\sthe\sxfer\sparser\sand\smake\sit\send\sup\strying\sto\sparse\sfile\scontent\sas\scards).\r\n\r\nI've\sattached\sa\squick\sfix\spatch\swhich\ssimply\smake\sa\scopy\sof\sthe\sline\sbefore\sparsing\sit.\sIt\sworks\sbut\sit's\sprobably\spossible\sto\ssolve\sit\swithout\sthe\sadditional\scopy.
J foundin 8f41b2fa75
J private_contact ba07c6d5d3c5e044f8238154a7f39762cc1663cc
J severity Severe
J status Open
J title Manifest\sparser\sbug\scauses\sfossil\spush\sto\sfail\sif\sa\sfile\slook\slike\sa\smanifest\sbut\sisn't\sone
J type Code_Defect
K be56c89def7f86bcbd766009cd365f6a40a37345
U anonymous
Z 78e245626020d3892f819dac528bd34a