fix(systembus): align data length to prevent unaligned memory copy operations
This commit is contained in:
@@ -175,7 +175,7 @@ int SysbusUart_Recv(SYSBUS_UART *instPtr, SYSBUS_UART_FRAME *frame)
|
||||
{
|
||||
return EPARAM;
|
||||
}
|
||||
dWLen = (dLen + FRAME_HEAD_LEN + FRAME_INFO_LEN - 1) / 4 + 1;
|
||||
dWLen = NORMALIZE_SIZE(dLen + FRAME_HEAD_LEN + FRAME_INFO_LEN) / sizeof(uint32_t);
|
||||
|
||||
dBuff = malloc(sizeof(uint32_t) * dWLen);
|
||||
if (dBuff == NULL)
|
||||
|
||||
Reference in New Issue
Block a user