Skip to content

Commit

Permalink
Fix parsing of GDB <reg> tags not separated by whitespace
Browse files Browse the repository at this point in the history
`regstr_end + 3` would advance into the next `<reg>` tag if there is no
whitespace between the two tags.
  • Loading branch information
raphaelr committed Feb 19, 2024
1 parent 3e995d8 commit 84a70e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subprojects/rzgdb/src/gdbclient/xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ static RzList *_extract_regs(char *regstr, RzList *flags, char *pc_alias) {
rz_list_set_n(regs, regnum, tmpreg);
}
*regstr_end = '/';
regstr = regstr_end + 3;
regstr = regstr_end + 2;
if (rz_str_startswith(regstr, "</feature>")) {
regstr += sizeof("</feature>");
// Revert to default
Expand Down

0 comments on commit 84a70e9

Please sign in to comment.