Re: [PATCH 1/3] make_absolute_path: Don't try to copy a string to itself
- From
Jeff King <peff@peff.net>
- Date
- Mar 14, 2011, 20:02 UTC
- Message-ID
- <20110314200245.GB22602@sigill.intra.peff.net>
- In-Reply-To
- <1300130318-11279-2-git-send-email-cmn@elego.de>
On Mon, Mar 14, 2011 at 08:18:36PM +0100, Carlos Martín Nieto wrote:
> Sometimes (at least in t-0001-init.sh test 12), the return value of > make_absolute_path() is passed to it as an argument, making the first > and second arguments to strlcpy() the same, making the test fail when > run under valgrind.
Thanks, I can reproduce here and your fix looks good. I used to periodically run valgrind on the whole suite, but I haven't for quite a while. I should probably start doing it again.
-Peff