Skip to content

Commit 73fe690

Browse files
committed
gssapi: protect against empty messages
1 parent e5fb5fe commit 73fe690

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/transports/auth_negotiate.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ static int negotiate_next_token(
160160
goto done;
161161
}
162162

163+
if (output_token.length == 0) {
164+
git_error_set(GIT_ERROR_NET, "GSSAPI did not return token");
165+
error = -1;
166+
goto done;
167+
}
168+
163169
git_buf_puts(buf, "Negotiate ");
164170
git_buf_encode_base64(buf, output_token.value, output_token.length);
165171

0 commit comments

Comments
 (0)