mw_debug: Fix memory overflow with "sim" backend

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
pull/185/head
Benjamin Herrenschmidt 5 years ago
parent 84ab28b3d2
commit b8df0647fd

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



Loading…
Cancel
Save