r1163 - in branches/1.0: . bin/varnishncsa

des at projects.linpro.no des at projects.linpro.no
Wed Oct 18 16:26:47 CEST 2006


Author: des
Date: 2006-10-18 16:26:47 +0200 (Wed, 18 Oct 2006)
New Revision: 1163

Modified:
   branches/1.0/
   branches/1.0/bin/varnishncsa/varnishncsa.c
Log:
 r31755 at cat (orig r1124):  andersb | 2006-09-24 19:59:00 +0200
 Fixed: Compiles correctly, but has a 128 char long maximum for Remote Username.
 
 
 



Property changes on: branches/1.0
___________________________________________________________________
Name: svk:merge
   - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1123
   + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1124

Modified: branches/1.0/bin/varnishncsa/varnishncsa.c
===================================================================
--- branches/1.0/bin/varnishncsa/varnishncsa.c	2006-10-18 14:26:46 UTC (rev 1162)
+++ branches/1.0/bin/varnishncsa/varnishncsa.c	2006-10-18 14:26:47 UTC (rev 1163)
@@ -91,6 +91,7 @@
 	unsigned lu;
 	struct tm tm;
 	char tbuf[40];
+	char rubuf[128];
 	struct logline *lp;
 
 	if (!(spec &VSL_S_CLIENT))
@@ -177,11 +178,13 @@
 	
 	if (lp->df_RU != NULL){
 		base64_init();
-		lu = sizeof lp->df_RU;
-		base64_decode(lp->df_RU, &lu, lp->df_RU);
-		q = strchr(lp->df_RU, ':');
-		*q = '\0';
-		fprintf(fo, " %s", lp->df_RU);
+		lu = sizeof rubuf;
+		base64_decode(rubuf, lu, lp->df_RU);
+		q = strchr(rubuf, ':');
+		if (q != NULL){
+			*q = '\0';
+		}
+		fprintf(fo, " %s", rubuf);
 		free(lp->df_RU);
 		lp->df_RU = NULL;
 	}




More information about the varnish-commit mailing list