Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2009 18:45:33 GMT
From:      Boris Lytochkin <lytboris@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/136012: libpdel is broken on CURRENT after June,9 
Message-ID:  <200906241845.n5OIjXQG072374@www.freebsd.org>
Resent-Message-ID: <200906241850.n5OIo1Q2083069@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         136012
>Category:       ports
>Synopsis:       libpdel is broken on CURRENT after June,9
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 24 18:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Boris Lytochkin
>Release:        800099
>Organization:
Yandex
>Environment:
FreeBSD  8.0-CURRENT FreeBSD 8.0-CURRENT #0: Tue Jun 23 22:39:46 MSD 2009     root@:/opt/obj/usr/src/sys/GENERIC  i386

>Description:
*LEN macros that were deleted in 1.31 commit are used both in devel/libpdel and net/mpd4 ports - this breaks building of them.
>How-To-Repeat:
update to CURRENT after June, 9
make -C /usr/ports/devel/libpdel clean all

>Fix:
All *LEN macros should be replaced with appropriate *SIZ macros.


Patch attached with submission follows:

--- ppp/ppp_l2tp_ctrl.c.orig	2005-01-22 00:02:07.000000000 +0300
+++ ppp/ppp_l2tp_ctrl.c	2009-06-24 22:00:15.000000000 +0400
@@ -200,7 +200,7 @@
 	u_int16_t		peer_id;		/* peer session id */
 	struct ppp_log		*log;			/* log */
 	ng_ID_t			node_id;		/* tee node id */
-	char			hook[NG_HOOKLEN + 1];	/* session hook name */
+	char			hook[NG_HOOKSIZ];	/* session hook name */
 	void			*link_cookie;		/* opaque link cookie */
 	u_int16_t		result;			/* close result code */
 	u_int16_t		error;			/* close error code */
@@ -608,7 +608,7 @@
 
 	/* Done */
 	*nodep = ctrl->node_id;
-	strlcpy(hook, NG_L2TP_HOOK_LOWER, NG_HOOKLEN + 1);
+	strlcpy(hook, NG_L2TP_HOOK_LOWER, NG_HOOKSIZ);
 	return (ctrl);
 
 fail:
@@ -1860,7 +1860,7 @@
 	    struct ng_mesg msg;
 	} buf;
 	struct ng_mesg *const msg = &buf.msg;
-	char raddr[NG_PATHLEN + 1];
+	char raddr[NG_PATHSIZ];
 	int len;
 
 	/* Read netgraph control message */
--- ppp/ppp_l2tp_ctrl.h.orig	2005-01-22 00:02:07.000000000 +0300
+++ ppp/ppp_l2tp_ctrl.h	2009-06-24 22:00:15.000000000 +0400
@@ -201,7 +201,7 @@
  *	peer_id	Unique identifier for peer (used for tie-breakers)
  *	initiate Whether to send a SCCRQ or just wait for one
  *	nodep	Pointer to netgraph node ID variable
- *	hook	Buffer for hook on L2TP netgraph node (size >= NG_HOOKLEN + 1)
+ *	hook	Buffer for hook on L2TP netgraph node (size >= NG_HOOKSIZ)
  *	avps	List of AVP's to include in the associated
  *		Start-Control-Connection-Request or
  *		Start-Control-Connection-Reply control message.
--- ppp/ppp_l2tp_server.c.orig	2005-01-22 00:02:07.000000000 +0300
+++ ppp/ppp_l2tp_server.c	2009-06-24 22:00:15.000000000 +0400
@@ -103,7 +103,7 @@
 	struct ppp_channel		*chan;		/* pointer to channel */
 	struct ppp_auth_config		auth;		/* auth config */
 	char				node[32];		/* node path */
-	char				hook[NG_HOOKLEN + 1];	/* node hook */
+	char				hook[NG_HOOKSIZ];	/* node hook */
 	char				logname[32];	/* peer logname */
 	struct in_addr			ip;		/* peer ip address */
 	u_int16_t			port;		/* peer port */
@@ -536,7 +536,7 @@
 	struct sockaddr_in sin;
 	const size_t bufsize = 8192;
 	u_int16_t *buf = NULL;
-	char hook[NG_HOOKLEN + 1];
+	char hook[NG_HOOKSIZ];
 	socklen_t sin_len;
 	char namebuf[64];
 	ng_ID_t node_id;
--- ppp/ppp_node.c.orig	2005-01-22 00:02:08.000000000 +0300
+++ ppp/ppp_node.c	2009-06-24 22:00:15.000000000 +0400
@@ -431,7 +431,7 @@
 ppp_node_send_msg(struct ppp_node *node, const char *relpath,
 	u_int32_t cookie, u_int32_t cmd, const void *payload, size_t plen)
 {
-	char path[NG_PATHLEN + 1];
+	char path[NG_PATHSIZ];
 
 	if (relpath == NULL)
 		strlcpy(path, NODE_HOOK, sizeof(path));
@@ -494,7 +494,7 @@
 {
 	struct ppp_node *const node = arg;
 	const size_t max_msglen = 4096;
-	char raddr[NG_PATHLEN + 1];
+	char raddr[NG_PATHSIZ];
 	struct ppp_node_recvmsg *rm;
 	struct ng_mesg *msg;
 	int found = 0;


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906241845.n5OIjXQG072374>