On Wed, 2003-12-24 at 16:20, MH wrote:
> Can anyone else reproduce these results?

this patch is more better than the one i sent yesterday...

and should fix the problem in a better way..

let me know

regards, Michele
-- 
mydecay
S.P.I.N.E. Group - http://www.spine-group.org
Key Fingerprint: 667A 4E73 EA53 66AC E2AB  D0CA 2908 1484 1F26 4C40
GnuPG Key: http://www.spine-group.org/keys/mydecay.asc
--- print-l2tp.c.old	2003-12-24 19:35:08.000000000 +0100
+++ print-l2tp.c	2003-12-25 11:17:05.241451616 +0100
@@ -492,9 +492,11 @@
 		/* Vendor Specific Attribute */
 	        printf("VENDOR%04x:", EXTRACT_16BITS(ptr)); ptr++;
 		printf("ATTR%04x", EXTRACT_16BITS(ptr)); ptr++;
-		printf("(");
-		print_octets((u_char *)ptr, len-6);
-		printf(")");
+		if (length > 6) {
+			printf("(");
+			print_octets((u_char *)ptr, len-6);
+			printf(")");
+		}
 	} else {
 		/* IETF-defined Attributes */
 		ptr++;
@@ -594,7 +596,8 @@
 		printf(")");
 	}
 
-	l2tp_avp_print(dat+len, length-len);
+	if (length >= len && len > 0)
+		l2tp_avp_print(dat+len, length-len);
 	return;
 
  trunc:

Reply via email to