From: Benjamin Cama Date: Mon, 25 Jul 2011 10:12:53 +0000 (+0200) Subject: Fix a bug in parameters length setting. X-Git-Tag: debian/2.2.1-1fdn1~1^2^2~2 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/e6fe57eec8fc00543e7ee5f4e137331a6c65217c?ds=sidebyside;hp=-c Fix a bug in parameters length setting. Signed-off-by: Benjamin Cama --- e6fe57eec8fc00543e7ee5f4e137331a6c65217c diff --git a/bgp.c b/bgp.c index e2939d2..7ac4c12 100644 --- a/bgp.c +++ b/bgp.c @@ -1714,7 +1714,7 @@ static int bgp_send_update6(struct bgp_peer *peer) /* go back and insert attr_len */ attr_len = htons(len - 4); - memcpy(&peer->outbuf->packet.data + 2, &attr_len, sizeof(attr_len)); + memcpy((char *)&peer->outbuf->packet.data + 2, &attr_len, sizeof(attr_len)); peer->outbuf->packet.header.len = htons(len); peer->outbuf->done = 0;