From dan@xkulesh.vol.cz  Tue Mar 12 17:21:29 2002
Return-Path: <dan@xkulesh.vol.cz>
Received: from xkulesh.vol.cz (xkulesh.vol.cz [195.250.154.106])
	by hub.freebsd.org (Postfix) with ESMTP id 8D5D837B400
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Mar 2002 17:21:26 -0800 (PST)
Message-Id: <200203130113.g2D1DD970719@xkulesh.vol.cz>
Date: Wed, 13 Mar 2002 02:13:13 +0100 (CET)
From: Dan Lukes <dan@obluda.cz>
Reply-To: Dan Lukes <dan@obluda.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Typo in ppp's mppe.c MPPEDispOpts output
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35836
>Category:       bin
>Synopsis:       Typo in ppp's mppe.c MPPEDispOpts output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 12 17:30:01 PST 2002
>Closed-Date:    Wed Mar 13 02:08:28 PST 2002
>Last-Modified:  Wed Mar 13 02:38:38 PST 2002
>Originator:     Dan Lukes
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
Obludarium
>Environment:
System: FreeBSD 4.5-STABLE Sat Mar 2 15:16:06 CET 2002 dan@...:/usr/src/sys/compile/Dan i386

PPP: user-ppp 2.3.3 (built Mar  2 2002)

	
>Description:
	The MPPEDispOpts incorrectly build description string when no
encryption requested by peer. It add "(0" string to buffer, but add 1 only
to buffer len, so '0' is overwritten by subsequent writes.
>How-To-Repeat:
	enable CCP logging and connect to a PPP peer asking MPPC without
MPPE (it's implemented as ask for MPPE with MPPE_OPT_COMPRESSED bit set 
but all MPPE_OPT_BITMASK bits cleared
>Fix:

--- mppe.c.ORIG Sun Sep  2 06:08:33 2001
+++ mppe.c      Wed Mar 13 01:48:43 2002
@@ -372,7 +372,7 @@
   len = strlen(buf);
   if (!(val & MPPE_OPT_BITMASK)) {
     snprintf(buf + len, sizeof buf - len, "(0");
-    len++;
+    len+=2;
   } else {
     ch = '(';
     if (val & MPPE_OPT_128BIT) {



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Tue Mar 12 22:35:25 PST 2002 
Responsible-Changed-Why:  
To ppp(8) maintainer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=35836 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Wed Mar 13 02:08:28 PST 2002 
State-Changed-Why:  
I've applied a more generic patch that fixes the problem. 
I'll MFC it in 2 weeks given no complaints. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=35836 
>Unformatted:
