Module: kamailio
Branch: master
Commit: 66508a753d8685ba8bcd0b43a94ce3477c198c4a
URL:
https://github.com/kamailio/kamailio/commit/66508a753d8685ba8bcd0b43a94ce34…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-09-16T09:51:40+02:00
presence: init event structure to avoid use if invaid values
---
Modified: src/modules/presence/presentity.c
---
Diff:
https://github.com/kamailio/kamailio/commit/66508a753d8685ba8bcd0b43a94ce34…
Patch:
https://github.com/kamailio/kamailio/commit/66508a753d8685ba8bcd0b43a94ce34…
---
diff --git a/src/modules/presence/presentity.c b/src/modules/presence/presentity.c
index f496f4a583..a0667d096a 100644
--- a/src/modules/presence/presentity.c
+++ b/src/modules/presence/presentity.c
@@ -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);