Skip to content

Commit

Permalink
Fixed invalid read when loading the list of agents for an IP.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed Dec 7, 2022
1 parent d85ce45 commit cd1984a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/goaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,12 @@ load_ip_agent_list (void) {
int type_ip = 0;
/* make sure we have a valid IP */
int sel = gscroll.module[gscroll.current].scroll;
GDashData item = dash->module[HOSTS].data[sel];
GDashData item = {0};

if (dash->module[HOSTS].holder_size == 0)
return;

item = dash->module[HOSTS].data[sel];
if (!invalid_ipaddr (item.metrics->data, &type_ip))
load_agent_list (main_win, item.metrics->data);
}
Expand Down

0 comments on commit cd1984a

Please sign in to comment.