Re: [PATCH 0/3] avoiding unintended consequences of git_path() usage
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Nov 16, 2011, 13:33 UTC
- Message-ID
- <CACsJy8A2=qBiyY3SD-PZo+E=U+Dfjm1UQidgq6khQARZ3d41WQ@mail.gmail.com>
- In-Reply-To
- <20111116075955.GB13706@elie.hsd1.il.comcast.net>
2011/11/16 Jonathan Nieder <jrnieder@gmail.com>:
> 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