From 5626ce7851a6f3cfa3ab431ecd0573d7bc83477e Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 1 Jun 2017 21:54:01 -0700 Subject: [PATCH] NcpBase: Fix insert handler for `MAC_WHITELIST` property (#1862) Use `sizeof(otExtAddress)` directly when checking the length of value portion of spinel frame (instead of using the `sizeof` variable which is a pointer to an `otExtAddress`). --- src/ncp/ncp_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index c2be77470..66cb1919b 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -7036,7 +7036,7 @@ otError NcpBase::InsertPropertyHandler_MAC_WHITELIST(uint8_t header, spinel_prop int8_t rssi = RSSI_OVERRIDE_DISABLED; - if (value_len > static_cast(sizeof(ext_addr))) + if (value_len > static_cast(sizeof(otExtAddress))) { parsedLength = spinel_datatype_unpack( value_ptr,