Skip to content

Commit 020d2d5

Browse files
committed
Check for extended services below 0xC8
1 parent f6e7138 commit 020d2d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/xcp.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,11 @@ void Xcp_DispatchCommand(Xcp_PduType const * const pdu) {
955955
#if XCP_ENABLE_STATISTICS == XCP_ON
956956
Xcp_State.statistics.ctosReceived++;
957957
#endif /* XCP_ENABLE_STATISTICS */
958-
Xcp_ServerCommands[UINT8(0xff) - cmd](pdu);
958+
if (cmd < 0xc8) {
959+
Xcp_CommandNotImplemented_Res(pdu);
960+
} else {
961+
Xcp_ServerCommands[UINT8(0xff) - cmd](pdu);
962+
}
959963
}
960964
} else { /* not connected. */
961965
#if XCP_ENABLE_STATISTICS == XCP_ON

0 commit comments

Comments
 (0)