Module: kamailio
Branch: master
Commit: a6c415713bb209b03ff110d4ae891173d04ac471
URL:
https://github.com/kamailio/kamailio/commit/a6c415713bb209b03ff110d4ae89117…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-07-25T08:44:15+02:00
core: cfg select - check res before initializing
---
Modified: src/core/cfg/cfg_select.c
---
Diff:
https://github.com/kamailio/kamailio/commit/a6c415713bb209b03ff110d4ae89117…
Patch:
https://github.com/kamailio/kamailio/commit/a6c415713bb209b03ff110d4ae89117…
---
diff --git a/src/core/cfg/cfg_select.c b/src/core/cfg/cfg_select.c
index f3b2d681d3e..e6c599a204e 100644
--- a/src/core/cfg/cfg_select.c
+++ b/src/core/cfg/cfg_select.c
@@ -147,8 +147,10 @@ int select_cfg_var(str *res, select_t *s, struct sip_msg *msg)
int i;
static char buf[INT2STR_MAX_LEN];
- res->s = 0;
- res->len = 0;
+ if(res != NULL) {
+ res->s = 0;
+ res->len = 0;
+ }
if(msg == NULL) {
/* fixup call */