aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2006-09-23 01:08:45 +0200
committerJunio C Hamano <junkio@cox.net>2006-09-22 16:53:31 -0700
commit7c1a278d99a18445e12bd55e308cd69080963198 (patch)
tree45a248ea8f94c7c90953ef74a51e4b22bc69593b /refs.c
parentafdcec73660737d0ac28a808829ab76587a9befa (diff)
downloadgit-7c1a278d99a18445e12bd55e308cd69080963198.tar.gz
git-7c1a278d99a18445e12bd55e308cd69080963198.tar.xz
Fix buggy ref recording
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>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 40f16af18..5fdf9c413 100644
--- a/refs.c
+++ b/refs.c
@@ -472,7 +472,7 @@ static struct ref_lock *lock_ref_sha1_basic(const char *ref,
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))