Skip to content

Commit 85f1345

Browse files
author
Jarkko Paso
committed
MAC: Check length pointer in ie vector length validate
1 parent 672c4ef commit 85f1345

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/MAC/IEEE802_15_4/mac_mcps_sap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ void mcps_sap_data_req_handler(protocol_interface_rf_mac_setup_s *rf_mac_setup ,
154154

155155
static bool mac_ie_vector_length_validate(ns_ie_iovec_t *ie_vector, uint16_t iov_length, uint16_t *length_out)
156156
{
157-
*length_out = 0;
157+
if (length_out) {
158+
*length_out = 0;
159+
}
160+
158161
if (!iov_length) {
159162
return true;
160163
}

0 commit comments

Comments
 (0)