summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: afdcec7)
raw | patch | inline | side by side (parent: afdcec7)
author | Petr Baudis <pasky@suse.cz> | |
Fri, 22 Sep 2006 23:08:45 +0000 (01:08 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 22 Sep 2006 23:53:31 +0000 (16:53 -0700) |
There is a format string vulnerability introduced with the packed refs
file format.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
file format.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
refs.c | patch | blob | history |
index 40f16af18562dbe3e32be2dfe7c700c295ed744e..5fdf9c4139f81d37be932c4a029fa5fa29cdc62d 100644 (file)
--- a/refs.c
+++ b/refs.c
lock->ref_name = xstrdup(ref);
lock->log_file = xstrdup(git_path("logs/%s", ref));
- ref_file = git_path(ref);
+ ref_file = git_path("%s", ref);
lock->force_write = lstat(ref_file, &st) && errno == ENOENT;
if (safe_create_leading_directories(ref_file))