Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

gdbstub's read memory length is off-by-one #29

Closed
mwalle opened this Issue · 1 comment

2 participants

@mwalle
Collaborator

supposed fix:

--- a/software/gdbstub/gdbstub.c
+++ b/software/gdbstub/gdbstub.c
@@ -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"); }
@sbourdeauducq

Applied, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.