[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squid-cvs
Subject:    /bzr/squid3/trunk/ r9107: Author: Markus <huaraz@moeller.plus.com>
From:       Amos Jeffries <squid3 () treenet ! co ! nz>
Date:       2008-07-29 13:00:30
Message-ID: 20080729130531.64246.qmail () squid-cache ! org
[Download RAW message or body]

--===============0997187340==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------
revno: 9107
committer: Amos Jeffries <squid3@treenet.co.nz>
branch nick: trunk
timestamp: Wed 2008-07-30 01:00:30 +1200
message:
  Author: Markus <huaraz@moeller.plus.com>
  Bug 2426: Increase buffer in authenticateNegotiateStart
modified:
  src/auth/negotiate/auth_negotiate.cc

--===============0997187340==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; name="r9107.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

=== modified file 'src/auth/negotiate/auth_negotiate.cc'
--- a/src/auth/negotiate/auth_negotiate.cc	2008-07-09 14:28:16 +0000
+++ b/src/auth/negotiate/auth_negotiate.cc	2008-07-29 13:00:30 +0000
@@ -55,6 +55,11 @@
  \ingroup AuthNegotiateAPI
  */
 
+/**
+ * Maximum length (buffer size) for token strings.
+ */
+#define MAX_AUTHTOKEN_LEN   32768
+
 static void
 authenticateNegotiateReleaseServer(AuthUserRequest * auth_user_request);
 
@@ -562,7 +567,7 @@
 AuthNegotiateUserRequest::module_start(RH * handler, void *data)
 {
     authenticateStateData *r = NULL;
-    static char buf[8192];
+    static char buf[MAX_AUTHTOKEN_LEN];
     negotiate_user_t *negotiate_user;
     AuthUser *auth_user = user();
 
@@ -588,9 +593,9 @@
     AUTHUSERREQUESTLOCK(r->auth_user_request, "r");
 
     if (auth_state == AUTHENTICATE_STATE_INITIAL) {
-        snprintf(buf, 8192, "YR %s\n", client_blob); //CHECKME: can ever client_blob \
be 0 here? +        snprintf(buf, MAX_AUTHTOKEN_LEN, "YR %s\n", client_blob); \
//CHECKME: can ever client_blob be 0 here?  } else {
-        snprintf(buf, 8192, "KK %s\n", client_blob);
+        snprintf(buf, MAX_AUTHTOKEN_LEN, "KK %s\n", client_blob);
     }
 
     waiting = 1;


--===============0997187340==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic