From: Nguyen Thai Ngoc Duy Date: Wed, 16 Nov 2011 13:33:26 GMT Subject: Re: [PATCH 0/3] avoiding unintended consequences of git_path() usage Message-ID: In-Reply-To: <20111116075955.GB13706@elie.hsd1.il.comcast.net> 2011/11/16 Jonathan Nieder : > Jokes aside, here's a rough series to do the git_path -> > git_path_unsafe renaming.  While writing it, I noticed a couple of > bugs, hence the two patches before the last one.  Patch 2 is the more > interesting one. Another approach is do nothing and leave it for a static analysis tool to detect potential problems. I'm looking at sparse at the moment, although I know nothing about it to say if it can or cannot detect such problems. We can at least make sparse detect return value from git_path() being passed to an unsafe function, I think. -- Duy