From faf185d337229fd521bfbadbb8c8ad3a34e5b705 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Tue, 9 Apr 2013 21:42:35 +0200 Subject: l2tp: Fix double string AVP copy When adding a string AVP to an L2TP packet, the attribute value is allocated and set using strdup(). There's no need to memcpy() it again afterwards. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/packet.c | 1 - 1 file changed, 1 deletion(-) (limited to 'accel-pppd/ctrl/l2tp/packet.c') diff --git a/accel-pppd/ctrl/l2tp/packet.c b/accel-pppd/ctrl/l2tp/packet.c index 87735a2..03816d5 100644 --- a/accel-pppd/ctrl/l2tp/packet.c +++ b/accel-pppd/ctrl/l2tp/packet.c @@ -469,7 +469,6 @@ int l2tp_packet_add_string(struct l2tp_packet_t *pack, int id, const char *val, mempool_free(attr); return -1; } - memcpy(attr->val.string, val, attr->length); list_add_tail(&attr->entry, &pack->attrs); return 0; -- cgit v1.2.3