diff options
author | Vicent Martà <vicent@github.com> | 2013-03-07 07:47:20 -0800 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-03-07 07:47:20 -0800 |
commit | 6a9ef012376e8a21dcfd0499ab16048eb6e954c3 (patch) | |
tree | e501f5be5296ce8d894e69867eb511a6be81fa27 /src | |
parent | 9952f24e6cc71ef5ecd13831f783e308aae97c36 (diff) | |
parent | bb45c57f94d3c7c96e78234e2a81393c0ced45a0 (diff) | |
download | libgit2-6a9ef012376e8a21dcfd0499ab16048eb6e954c3.tar.gz |
Merge pull request #1401 from carlosmn/leading-slash
refs: explicitly catch leading slashes
Diffstat (limited to 'src')
-rw-r--r-- | src/refs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refs.c b/src/refs.c index 113cadad5..dd3dd64b1 100644 --- a/src/refs.c +++ b/src/refs.c @@ -1667,6 +1667,9 @@ int git_reference__normalize_name( process_flags = flags; current = (char *)name; + if (*current == '/') + goto cleanup; + if (normalize) git_buf_clear(buf); |