Module: kamailio Branch: master Commit: a6c415713bb209b03ff110d4ae891173d04ac471 URL: https://github.com/kamailio/kamailio/commit/a6c415713bb209b03ff110d4ae891173d04ac471
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@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/a6c415713bb209b03ff110d4ae891173d04ac471.diff Patch: https://github.com/kamailio/kamailio/commit/a6c415713bb209b03ff110d4ae891173d04ac471.patch --- 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 */ _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org