mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
bios/boot: Fix memcpy exceeding length (Thanks @acathla).
This commit is contained in:
parent
7b259888bb
commit
02c0ed2de7
1 changed files with 1 additions and 1 deletions
|
@ -260,7 +260,7 @@ int serialboot(void)
|
||||||
|
|
||||||
/* Copy payload */
|
/* Copy payload */
|
||||||
load_addr = (char *)(uintptr_t) get_uint32(&frame.payload[0]);
|
load_addr = (char *)(uintptr_t) get_uint32(&frame.payload[0]);
|
||||||
memcpy(load_addr, &frame.payload[4], frame.payload_length);
|
memcpy(load_addr, &frame.payload[4], frame.payload_length - 4);
|
||||||
|
|
||||||
/* Acknowledge and continue */
|
/* Acknowledge and continue */
|
||||||
uart_write(SFL_ACK_SUCCESS);
|
uart_write(SFL_ACK_SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue