Skip to content

Commit

Permalink
Fix radareorg#14732 - Fix out-of-bounds read
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoLCR authored and radare committed Aug 1, 2019
1 parent 033e37d commit 04bb411
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libr/core/panels.c
Original file line number Diff line number Diff line change
Expand Up @@ -6286,11 +6286,11 @@ char *get_word_from_canvas_for_menu(RCore *core, RPanels *panels, int x, int y)
pos = R;
}
int i = 0;
while (pos && strncmp (padding, pos, strlen (padding))) {
while (pos > R && strncmp (padding, pos, strlen (padding))) {
pos--;
i++;
}
while (tmp && strncmp (padding, tmp, strlen (padding))) {
while (*tmp && strncmp (padding, tmp, strlen (padding))) {
tmp++;
i++;
}
Expand Down

0 comments on commit 04bb411

Please sign in to comment.