diff options
author | Etienne Samson <samson.etienne@gmail.com> | 2018-08-21 02:11:32 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-10-26 14:58:52 +0200 |
commit | 4ca4c7d1968281954e214d1cd80990c0e3543d70 (patch) | |
tree | 975dcead0dcfb12e8c4312faacbea132003ca292 | |
parent | e78f9f66d829b35ea95376717ea83c4f9f409312 (diff) | |
download | libgit2-4ca4c7d1968281954e214d1cd80990c0e3543d70.tar.gz |
transport/http: do not return success if we failed to get a scheme
Otherwise we return a NULL context, which will get dereferenced in
apply_credentials.
(cherry picked from commit 1c949ce1483ca22a29e8f523360999cbbe411a50)
-rw-r--r-- | src/transports/http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transports/http.c b/src/transports/http.c index e051c8a35..575d7c9d7 100644 --- a/src/transports/http.c +++ b/src/transports/http.c @@ -142,7 +142,7 @@ static int auth_context_match( } if (!scheme) - return 0; + return -1; /* See if authentication has already started for this scheme */ git_vector_foreach(&t->auth_contexts, i, c) { |