From: Amos Jeffries Date: Wed, 6 Aug 2008 12:51:15 +0000 (+1200) Subject: Author: Markus X-Git-Tag: SQUID_3_1_0_1~49^2~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94fd8c3a589d9431d47f00c8079359731072411d;p=thirdparty%2Fsquid.git Author: Markus Bug 2426: Increase buffer in authenticateNegotiateStart / squid_kerb_auth - Kerberos helper bit left out of first patch. --- diff --git a/helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c b/helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c index bc2c3f5f54..2870a13f56 100644 --- a/helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c +++ b/helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c @@ -40,6 +40,10 @@ #include "spnegohelp.h" #endif +// AYJ: must match the definition in src/auth/negotiate/auth_negotiate.cc +#define MAX_AUTHTOKEN_LEN 32768 + +// AYJ: match define in include/rfc2181.h #ifndef HOST_NAME_MAX #define HOST_NAME_MAX 256 #endif @@ -177,11 +181,9 @@ int check_gss_err(OM_uint32 major_status, OM_uint32 minor_status, const char* fu return(0); } - - int main(int argc, char * const argv[]) { - char buf[6400]; + char buf[MAX_AUTHTOKEN_LEN]; char *c; int length=0; static int err=0; diff --git a/src/auth/negotiate/auth_negotiate.cc b/src/auth/negotiate/auth_negotiate.cc index cfde0a883a..b656b6c46e 100644 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/auth_negotiate.cc @@ -58,6 +58,7 @@ /** * Maximum length (buffer size) for token strings. */ +// AYJ: must match re-definition in helpers/negotiate_auth/squid_kerb_auth/squid_kerb_auth.c #define MAX_AUTHTOKEN_LEN 32768 static void