login
Header Space

 
 

[PATCH] apply --cached: fix crash in subdirectory

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Martin Waitz <tali@...>
Cc: <git@...>, <junkio@...>
Date: Saturday, January 20, 2007 - 9:17 pm

The static variable "prefix" was shadowed by an unused parameter
of the same name. In case of execution in a subdirectory, the
static variable was accessed, leading to a crash.

Signed-off-by: Knoppix User <knoppix@zweitrechner.(none)>
---

	On Sat, 20 Jan 2007, Martin Waitz wrote:
	
	> git-apply inside the "src" directory segfaulted.

	Well, that was not the complete truth now, was it? Cannily, you 
	avoided mentioning the use of the "--cached" argument...

	But as you see, your evil plan failed ;-)

 builtin-apply.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-apply.c b/builtin-apply.c
index 54fd2cb..ef927f8 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -2589,7 +2589,7 @@ static int git_apply_config(const char *var, const char *value)
 }
 
 
-int cmd_apply(int argc, const char **argv, const char *prefix)
+int cmd_apply(int argc, const char **argv, const char *prefix2)
 {
 	int i;
 	int read_stdin = 1;
-- 
1.5.0.rc1.gd85c

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
SEGV in git-apply, Martin Waitz, (Fri Jan 19, 9:48 pm)
Re: SEGV in git-apply, Johannes Schindelin, (Fri Jan 19, 10:14 pm)
Re: SEGV in git-apply, Martin Waitz, (Sat Jan 20, 2:36 pm)
[PATCH] apply --cached: fix crash in subdirectory, Johannes Schindelin, (Sat Jan 20, 9:17 pm)
Re: [PATCH] apply --cached: fix crash in subdirectory, Rogan Dawes, (Sun Jan 21, 12:47 pm)
Re: [PATCH] apply --cached: fix crash in subdirectory, Johannes Schindelin, (Sun Jan 21, 2:03 pm)
Re: [PATCH] apply --cached: fix crash in subdirectory, Martin Waitz, (Sun Jan 21, 10:40 am)
speck-geostationary