]> git.ipfire.org Git - thirdparty/git.git/commit - symlinks.c
lstat_cache: guard against full match of length of 'name' parameter
authorKjetil Barvik <barvik@broadpark.no>
Sun, 14 Jun 2009 13:08:28 +0000 (15:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2009 03:20:12 +0000 (20:20 -0700)
commit77716755cbdf970fa0814a5f77c884b1f17693de
tree7ea6ab124233dafe0d1d9a894e298fc9a1e51f5c
parent4f6339b0c353b5c03b566b605e50a743d97fc08e
lstat_cache: guard against full match of length of 'name' parameter

longest_path_match() in symlinks.c does exactly what it's name says,
but in some cases that match can be too long, since the
has_*_leading_path() functions assumes that the match will newer be as
long as the name string given to the function.

fix this by adding an extra if test which checks if the match length
is equal to the 'len' parameter.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
symlinks.c
t/t6035-merge-dir-to-symlink.sh