diff options
author | Vicent Marti <vicent@github.com> | 2014-07-03 02:41:10 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-07-03 02:41:10 +0200 |
commit | 193fe9cbbfd911e240f6d4ab7fed3ec96f35c657 (patch) | |
tree | 87b81c59958f63ff3a0fdd6e21cdb8831e3cf872 /src | |
parent | cb6e68c7e6dc2b87f742f0ea24704fe38d007578 (diff) | |
parent | 1380e7c6b1b802efdbbe48edf706e49cc309f370 (diff) | |
download | libgit2-193fe9cbbfd911e240f6d4ab7fed3ec96f35c657.tar.gz |
Merge pull request #2459 from libgit2/cmn/http-url-path
netops: error out on url without a path
Diffstat (limited to 'src')
-rw-r--r-- | src/netops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/netops.c b/src/netops.c index 965e4775d..8a60299c2 100644 --- a/src/netops.c +++ b/src/netops.c @@ -717,6 +717,9 @@ int gitno_extract_url_parts( if (u.field_set & (1 << UF_PATH)) { *path = git__substrdup(_path, u.field_data[UF_PATH].len); GITERR_CHECK_ALLOC(*path); + } else { + giterr_set(GITERR_NET, "invalid url, missing path"); + return GIT_EINVALIDSPEC; } if (u.field_set & (1 << UF_USERINFO)) { |