aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lisp
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-10-31 19:26:58 +0100
committerFlorin Coras <florin.coras@gmail.com>2021-11-02 04:44:46 +0000
commitb850932451a5c35951d6aa89d942e8399a7ce8dc (patch)
tree1cc3bb7f6645d24ff6d967d7262217e47dbcdea7 /src/plugins/lisp
parent31ee6f5d3069c23b4a11005b95ee3744b9720a17 (diff)
lisp: fix outside array bounds
Reported by gcc-11... Type: fix Change-Id: I30262f6496217335aa45cca2f541846a69bc15ee Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/lisp')
-rw-r--r--src/plugins/lisp/lisp-cp/lisp_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lisp/lisp-cp/lisp_types.h b/src/plugins/lisp/lisp-cp/lisp_types.h
index 3f7d0302640..324320b4758 100644
--- a/src/plugins/lisp/lisp-cp/lisp_types.h
+++ b/src/plugins/lisp/lisp-cp/lisp_types.h
@@ -253,7 +253,7 @@ foreach_gid_address_type_fcns
always_inline u64
mac_to_u64 (u8 * m)
{
- return (*((u64 *) m) & 0xffffffffffff);
+ return (*(u32 *) m) | ((u64) (*(u16 *) (m + 4)) << 32);
}
typedef struct