From 97f48a155a49e370a5db25dcdbb61dfb6b084382 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Wed, 26 Jun 2013 20:49:48 +0200 Subject: connlimit: Initialise connlimit key (MAC) Initialise 'key' before calling memcpy() to ensure that all bytes are set in the return value. Signed-off-by: Guillaume Nault --- accel-pppd/include/connlimit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accel-pppd/include') diff --git a/accel-pppd/include/connlimit.h b/accel-pppd/include/connlimit.h index a5645ee2..8711cf8b 100644 --- a/accel-pppd/include/connlimit.h +++ b/accel-pppd/include/connlimit.h @@ -11,7 +11,7 @@ static inline uint64_t cl_key_from_mac(uint8_t hw[6]) union { uint8_t hw[6]; uint64_t key; - } key; + } key = {{ 0 }}; memcpy(key.hw, hw, sizeof(key.hw)); -- cgit v1.2.3