Skip to content

Commit 85e13a7

Browse files
committed
zapi: Harden dispatch to prevent invalid data
Origin: SiliconLabsSoftware#124 Bug-SiliconLabs: UIC-3668 Relate-to: SLVDBBP-3169975 Relate-to: SiliconLabsSoftware/z-wave-engine-application-layer#42 Signed-off-by: Philippe Coval <[email protected]>
1 parent 034241a commit 85e13a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

applications/zpc/components/zwave_api/src/zwapi_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ bool zwapi_poll()
136136
zwapi_session_enqueue_rx_frames();
137137
bool more_frames = zwapi_session_dequeue_frame(&frame, &len);
138138

139-
if (frame) {
139+
if (frame && len >=1) {
140140
zwave_api_protocol_rx_dispatch(frame, len);
141141
free(frame);
142142
}

0 commit comments

Comments
 (0)