Skip to content

Commit

Permalink
presence: init event structure to avoid use if invaid values
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Sep 16, 2019
1 parent 28dc74f commit 66508a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/presence/presentity.c
Expand Up @@ -1355,6 +1355,7 @@ int pres_htable_restore(void)
ev_str.s = (char *)row_vals[event_col].val.string_val;
ev_str.len = strlen(ev_str.s);

memset(&ev, 0, sizeof(event_t));
if(event_parser(ev_str.s, ev_str.len, &ev) < 0) {
LM_ERR("parsing event\n");
free_event_params(ev.params.list, PKG_MEM_TYPE);
Expand Down

0 comments on commit 66508a7

Please sign in to comment.