mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
pkg/semtech_loramac: fix memcpy to uninitialized pointer
This commit is contained in:
parent
da3a17212e
commit
aff7ee3732
@ -64,7 +64,7 @@ void semtech_loramac_set_appskey(semtech_loramac_t *mac, const uint8_t *skey)
|
||||
mutex_lock(&mac->lock);
|
||||
MibRequestConfirm_t mibReq;
|
||||
mibReq.Type = MIB_APP_SKEY;
|
||||
memcpy(mibReq.Param.AppSKey, skey, LORAMAC_APPSKEY_LEN);
|
||||
mibReq.Param.AppSKey = (uint8_t *) skey;
|
||||
LoRaMacMibSetRequestConfirm(&mibReq);
|
||||
mutex_unlock(&mac->lock);
|
||||
}
|
||||
@ -84,7 +84,7 @@ void semtech_loramac_set_nwkskey(semtech_loramac_t *mac, const uint8_t *skey)
|
||||
mutex_lock(&mac->lock);
|
||||
MibRequestConfirm_t mibReq;
|
||||
mibReq.Type = MIB_NWK_SKEY;
|
||||
memcpy(mibReq.Param.NwkSKey, skey, LORAMAC_NWKSKEY_LEN);
|
||||
mibReq.Param.NwkSKey = (uint8_t *) skey;
|
||||
LoRaMacMibSetRequestConfirm(&mibReq);
|
||||
mutex_unlock(&mac->lock);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user