Commit 1c949ce1483ca22a29e8f523360999cbbe411a50

Etienne Samson 2018-08-21T02:11:32

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/http.c b/src/transports/http.c
index ea3e57a..bc3ab18 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) {