Skip to content

Commit 946a0c5

Browse files
jphickeydzbaker
authored andcommitted
Fix #35, remove write beyond end of array
The array being written to in these tests is sized to LC_MAX_ACTIONPOINTS. Writing to index LC_MAX_ACTIONPOINTS is beyond the end.
1 parent fde472b commit 946a0c5

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

unit-test/lc_cmds_tests.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,8 +1559,6 @@ void LC_SetAPStateCmd_Test_InvalidAPNumberActive(void)
15591559
PayloadPtr->NewAPState = LC_APSTATE_ACTIVE;
15601560
PayloadPtr->APNumber = LC_MAX_ACTIONPOINTS;
15611561

1562-
LC_OperData.ARTPtr[PayloadPtr->APNumber].CurrentState = LC_APSTATE_PERMOFF;
1563-
15641562
/* Execute the function being tested */
15651563
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
15661564

@@ -1592,8 +1590,6 @@ void LC_SetAPStateCmd_Test_InvalidAPNumberPassive(void)
15921590
PayloadPtr->NewAPState = LC_APSTATE_PASSIVE;
15931591
PayloadPtr->APNumber = LC_MAX_ACTIONPOINTS;
15941592

1595-
LC_OperData.ARTPtr[PayloadPtr->APNumber].CurrentState = LC_APSTATE_PERMOFF;
1596-
15971593
/* Execute the function being tested */
15981594
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
15991595

@@ -1624,8 +1620,6 @@ void LC_SetAPStateCmd_Test_InvalidAPNumberDisabled(void)
16241620
PayloadPtr->NewAPState = LC_APSTATE_DISABLED;
16251621
PayloadPtr->APNumber = LC_MAX_ACTIONPOINTS;
16261622

1627-
LC_OperData.ARTPtr[PayloadPtr->APNumber].CurrentState = LC_APSTATE_PERMOFF;
1628-
16291623
/* Execute the function being tested */
16301624
LC_SetAPStateCmd(&UT_CmdBuf.SetAPStateCmd);
16311625

0 commit comments

Comments
 (0)