commit | 8384d78886eca05cae2a4c1bccaee379d76c1e06 | [log] [tgz] |
---|---|---|
author | Michael Haggerty <mhagger@alum.mit.edu> | Thu Sep 15 23:10:39 2011 +0200 |
committer | Junio C Hamano <gitster@pobox.com> | Wed Oct 05 13:45:31 2011 -0700 |
tree | ef6710f2ad28d3b23c94c43d1d5fbdc1210362a0 | |
parent | d51b720fca4ee5418952a90f785317592a7a1242 [diff] [blame] |
resolve_ref(): verify that the input refname has the right format Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/refs.c b/refs.c index b055501..ee3e0cc 100644 --- a/refs.c +++ b/refs.c
@@ -504,6 +504,9 @@ if (flag) *flag = 0; + if (check_refname_format(ref, REFNAME_ALLOW_ONELEVEL)) + return NULL; + for (;;) { char path[PATH_MAX]; struct stat st;