Re: [ANNOUNCE] GIT 1.5.4-rc3

From
Ismail Dönmez <hidden>
Date
2016-06-15 22:44:04
Reply to
Jeff King, 2016-06-15
Saturday 12 January 2008 11:04:32 tarihinde Jeff King şunları yazmıştı:
On Sat, Jan 12, 2008 at 09:47:48AM +0200, Ismail Dönmez wrote:
quoted
So looks like tests no longer work as root, so I run make test as normal
user and I now see t7300-clean.sh fail, this time a real failure:

Removing part3.c
./test-lib.sh: line 193: 19413 Aborted                 git-clean
* FAIL 5: git-clean with prefix
I couldn't reproduce this just running the test, but running it under
valgrind showed a memory access error. Fix is below.

Junio, can you please sanity check this fix (it stops the valgrind
error, but I want to make sure my assumptions about match_pathspec are
right).

-- >8 --
git-clean: fix off-by-one memory access when given no arguments

The "seen" variable is used by match_pathspec, and must have
as many elements as there are in the given pathspec. We
create the pathspec either from the command line arguments
_or_ from just the current prefix.

Thus allocating "seen" based upon just argc is wrong, since
if argc == 0, then we still have one pathspec, the prefix,
but we don't allocate any space in "seen".

Signed-off-by: Jeff King <redacted>
Thanks Jefff, this fixes t7300-clean.sh for me.

Tested-by: İsmail Dönmez <redacted>

Regards,
ismail


-- 
Never learn by your mistakes, if you do you may never dare to try again.
Thread (12 messages) 12 messages, 5 authors, last reply 2016-06-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help