diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-10-20 17:22:27 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-01-24 09:54:28 -0600 |
commit | 73fe690db2241bf99590f9217da2d4e51c742fb2 (patch) | |
tree | 29d2d5147fa4a83ddcc18a6857645baff82153ef | |
parent | e5fb5fe5ad50fc60831fa33531ffef2dae3e1967 (diff) | |
download | libgit2-73fe690db2241bf99590f9217da2d4e51c742fb2.tar.gz |
gssapi: protect against empty messages
-rw-r--r-- | src/transports/auth_negotiate.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transports/auth_negotiate.c b/src/transports/auth_negotiate.c index 260fc1ceb..1c79a2468 100644 --- a/src/transports/auth_negotiate.c +++ b/src/transports/auth_negotiate.c @@ -160,6 +160,12 @@ static int negotiate_next_token( goto done; } + if (output_token.length == 0) { + git_error_set(GIT_ERROR_NET, "GSSAPI did not return token"); + error = -1; + goto done; + } + git_buf_puts(buf, "Negotiate "); git_buf_encode_base64(buf, output_token.value, output_token.length); |