Increase buffer in authenticateNegotiateStart

From: Markus Moeller <huaraz_at_moeller.plus.com>
Date: Sat, 26 Jul 2008 00:05:29 +0100

Would it be possible to increase the buffer in authenticateNegotiateStart as
in some cases base64 encode Kerberos Tokens can be bigger than 8kB.

Thank you
Markus

--- squid-2.7.STABLE3/src/auth/negotiate/auth_negotiate.c 2007-08-29
00:39:10.000000000 +0200
+++ squid-2.7.STABLE3.kerb/src/auth/negotiate/auth_negotiate.c 2008-07-25
14:15:37.000000000 +0200
@@ -573,7 +573,7 @@
 authenticateNegotiateStart(auth_user_request_t * auth_user_request, RH *
handler, void *data)
 {
     authenticateStateData *r = NULL;
- char buf[8192];
+ char buf[32768];
     char *sent_string = NULL;
     negotiate_user_t *negotiate_user;
     negotiate_request_t *negotiate_request;
@@ -606,9 +606,9 @@
     r->auth_user_request = auth_user_request;
     authenticateAuthUserRequestLock(r->auth_user_request);
     if (negotiate_request->auth_state == AUTHENTICATE_STATE_INITIAL) {
- snprintf(buf, 8192, "YR %s\n", sent_string);
+ snprintf(buf, 32768, "YR %s\n", sent_string);
     } else {
- snprintf(buf, 8192, "KK %s\n", sent_string);
+ snprintf(buf, 32768, "KK %s\n", sent_string);
     }
     negotiate_request->waiting = 1;
     safe_free(negotiate_request->client_blob);
Received on Sat Jul 26 2008 - 00:05:07 MDT

This archive was generated by hypermail 2.2.0 : Sat Jul 26 2008 - 12:00:06 MDT