Skip to content

Commit 85fb8d1

Browse files
authored
Merge pull request #624 from thingsconnected/pullreq7
LoRaMac Rx FRAME_TYPE_PROPRIETARY: memcpy out of bounds fix
2 parents 5c75cda + 9e3adb2 commit 85fb8d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mac/LoRaMac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ static void ProcessRadioRxDone( void )
13081308

13091309
break;
13101310
case FRAME_TYPE_PROPRIETARY:
1311-
memcpy1( MacCtx.RxPayload, &payload[pktHeaderLen], size );
1311+
memcpy1( MacCtx.RxPayload, &payload[pktHeaderLen], size - pktHeaderLen );
13121312

13131313
MacCtx.McpsIndication.McpsIndication = MCPS_PROPRIETARY;
13141314
MacCtx.McpsIndication.Status = LORAMAC_EVENT_INFO_STATUS_OK;

0 commit comments

Comments
 (0)