Skip to content

Commit 7008dbd

Browse files
rzrlmolina
authored andcommitted
fix(cc): Fix zwave_command_class_user_code.c frame size checking
Observed by ctest which was sporadically (1/10~)failing on zwave_command_class_user_code_test The change is trivial, since the 2s two bytes of frame is the class and the command, the handler should at least test the minimal lenght of 2 (so >= command index which is one). I have been running this test in loop over 30min and more and no more failing occured. Note I have observed this mistake in other CC, which will be fixed in later changes (and tests eventually hardened). Origin: SiliconLabsSoftware#111 Relate-to: SiliconLabsSoftware/z-wave-engine-application-layer#10 Relate-to: SiliconLabsSoftware#110 Signed-off-by: Philippe Coval <[email protected]>
1 parent 6b68856 commit 7008dbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

applications/zpc/components/zwave_command_classes/src/zwave_command_class_user_code.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ static sl_status_t zwave_command_class_user_code_control_handler(
13461346
const uint8_t *frame,
13471347
uint16_t frame_length)
13481348
{
1349-
if (frame_length < COMMAND_INDEX) {
1349+
if (frame_length <= COMMAND_INDEX) {
13501350
return SL_STATUS_NOT_SUPPORTED;
13511351
}
13521352

0 commit comments

Comments
 (0)