Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HUST CSE] Access array elements before Cross border inspection #366

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4422,17 +4422,19 @@ LoRaMacStatus_t LoRaMacMcChannelSetupRxParams( AddressIdentifier_t groupID, McRx
return LORAMAC_STATUS_BUSY;
}

if( ( groupID >= LORAMAC_MAX_MC_CTX ) ||
( MacCtx.NvmCtx->MulticastChannelList[groupID].ChannelParams.IsEnabled == false ) )
{
return LORAMAC_STATUS_MC_GROUP_UNDEFINED;
}

DeviceClass_t devClass = MacCtx.NvmCtx->MulticastChannelList[groupID].ChannelParams.Class;
if( ( devClass == CLASS_A ) || ( devClass > CLASS_C ) )
{
return LORAMAC_STATUS_PARAMETER_INVALID;
}

if( ( groupID >= LORAMAC_MAX_MC_CTX ) ||
( MacCtx.NvmCtx->MulticastChannelList[groupID].ChannelParams.IsEnabled == false ) )
{
return LORAMAC_STATUS_MC_GROUP_UNDEFINED;
}

*status &= 0x0F; // groupID OK

VerifyParams_t verify;
Expand Down