Skip to content

Commit

Permalink
verify that maps is a list before trying to deref the pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlyw committed Jun 14, 2019
1 parent cd343d1 commit a1ade7d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libr/core/visual.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ static bool __core_visual_gogo (RCore *core, int ch) {
RIOMap *map = r_io_map_get (core->io, core->offset);
if (!map) {
SdbListIter *i = ls_tail (core->io->maps);
map = ls_iter_get (i);
if (i) {
map = ls_iter_get (i);
}
}
if (map) {
r_core_seek (core, r_itv_begin (map->itv), 1);
Expand All @@ -217,7 +219,9 @@ static bool __core_visual_gogo (RCore *core, int ch) {
map = r_io_map_get (core->io, core->offset);
if (!map) {
SdbListIter *i = ls_head (core->io->maps);
map = ls_iter_get (i);
if (i) {
map = ls_iter_get (i);
}
}
if (map) {
RPrint *p = core->print;
Expand Down

0 comments on commit a1ade7d

Please sign in to comment.