Skip to content

Commit

Permalink
gdbstub: fix off-by-one error (Michael Walle)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Nov 10, 2011
1 parent 2c00c05 commit 8c9a376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion software/gdbstub/gdbstub.c
Expand Up @@ -505,7 +505,7 @@ static void cmd_mem_read(void)

/* try to read %x,%x */
if (hex2int(&ptr, &addr) > 0 && *ptr++ == ',' && hex2int(&ptr, &length) > 0
&& length < (sizeof(remcom_out_buffer) / 2)) {
&& length <= sizeof(remcom_out_buffer) / 2) {
if (mem2hex((char *)addr, remcom_out_buffer, length) == NULL) {
strcpy(remcom_out_buffer, "E14");
}
Expand Down

0 comments on commit 8c9a376

Please sign in to comment.