1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-11 23:43:15 +00:00

mw_debug: Fix memory overflow with "sim" backend

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt 2020-05-29 00:04:46 +10:00
parent 84ab28b3d2
commit b8df0647fd

View File

@ -176,7 +176,7 @@ static int sim_command(uint8_t op, uint8_t addr, uint64_t *data)
printf("\n");
}
write(sim_fd, buf, p - buf);
r = read(sim_fd, buf, 127);
r = read(sim_fd, buf, sizeof(buf));
if (0 && r > 0) {
int i;