author | Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> | |
Wed, 21 Jun 2006 09:04:12 +0000 (11:04 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Jun 2006 09:30:46 +0000 (02:30 -0700) | ||
commit | bb9e15a83c425ff31e4da6b004bd4557d528b755 | |
tree | 1fd9cce933413556be5994202c7bead7222df370 | tree | snapshot |
parent | 4170af82328e50a75723cee084ae779e7a882b9d | commit | diff |
Fix possible out-of-bounds array access
If match is "", match[-1] is accessed. Let pathspec_matches return 1 in that
case indicating that "" matches everything.
Incidently this fixes git-grep'ing in ".".
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If match is "", match[-1] is accessed. Let pathspec_matches return 1 in that
case indicating that "" matches everything.
Incidently this fixes git-grep'ing in ".".
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-grep.c | diff | blob | history |