From eee776f964046803911a5d9aa234e7757c82153b Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Fri, 14 Jun 2013 10:28:17 +0200 Subject: connlimit: Fix size of memcpy() for MAC address The 'hw' parameter of cl_key_from_mac() is actually a pointer, so 'key.hw' must be used instead to compute the size of the MAC address. Signed-off-by: Guillaume Nault --- accel-pppd/include/connlimit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'accel-pppd/include') diff --git a/accel-pppd/include/connlimit.h b/accel-pppd/include/connlimit.h index 4227bad..a5645ee 100644 --- a/accel-pppd/include/connlimit.h +++ b/accel-pppd/include/connlimit.h @@ -12,8 +12,8 @@ static inline uint64_t cl_key_from_mac(uint8_t hw[6]) uint8_t hw[6]; uint64_t key; } key; - - memcpy(key.hw, hw, sizeof(hw)); + + memcpy(key.hw, hw, sizeof(key.hw)); return key.key; } -- cgit v1.2.3