1
0
Fork 0

CO_SDOserver: static analysis: taking address of array

This commit is contained in:
temi54c1l8 2024-06-14 08:26:34 +02:00
parent 284ba1a41f
commit 8af3ef3c6b

View file

@ -1291,7 +1291,7 @@ CO_SDO_return_t CO_SDOserver_process(CO_SDOserver_t *SDO,
if ((SDO->sizeInd > 0U) && (SDO->sizeInd <= 4U)) {
/* expedited transfer */
SDO->CANtxBuff->data[0] = (uint8_t)(0x43U|((4U-SDO->sizeInd)<<2U));
(void)memcpy((void *)(&SDO->CANtxBuff->data[4]), (const void *)(&SDO->buf), SDO->sizeInd);
(void)memcpy((void *)(&SDO->CANtxBuff->data[4]), (const void *)(&SDO->buf[0]), SDO->sizeInd);
SDO->state = CO_SDO_ST_IDLE;
ret = CO_SDO_RT_ok_communicationEnd;
}