Module: kamailio Branch: master Commit: 046ba41e431fec7fad0c82a9091ea9e27d9f677d URL: https://github.com/kamailio/kamailio/commit/046ba41e431fec7fad0c82a9091ea9e27d9f677d
Author: Xenofon Karamanos <x...@gilawa.com> Committer: Henning Westerholt <h...@gilawa.com> Date: 2025-01-28T17:11:49+01:00 outbound: Fix flow_token_secret bug - flow_token_secret is of type str and not char* - check the length of the string instead of memory for initialization --- Modified: src/modules/outbound/outbound_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/046ba41e431fec7fad0c82a9091ea9e27d9f677d.diff Patch: https://github.com/kamailio/kamailio/commit/046ba41e431fec7fad0c82a9091ea9e27d9f677d.patch --- diff --git a/src/modules/outbound/outbound_mod.c b/src/modules/outbound/outbound_mod.c index f3c80f18c15..f2e0c7dbc3d 100644 --- a/src/modules/outbound/outbound_mod.c +++ b/src/modules/outbound/outbound_mod.c @@ -66,7 +66,7 @@ static cmd_export_t cmds[] = { static param_export_t params[] = { {"force_outbound_flag", PARAM_INT, &ob_force_flag}, {"force_no_outbound_flag", PARAM_INT, &ob_force_no_flag}, - {"flow_token_secret", PARAM_STRING, &flow_token_secret}, + {"flow_token_secret", PARAM_STR, &flow_token_secret}, {0, 0, 0} }; @@ -86,7 +86,7 @@ struct module_exports exports = { static void mod_init_openssl(void) { - if(flow_token_secret.s) { + if(flow_token_secret.s && flow_token_secret.len > 0) { assert(ob_key.len == SHA_DIGEST_LENGTH); LM_DBG("flow_token_secret mod param set. use persistent ob_key"); #if OPENSSL_VERSION_NUMBER < 0x030000000L _______________________________________________ Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org To unsubscribe send an email to sr-dev-le...@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!