Module: kamailio
Branch: master
Commit: 781ee072593f16a100ef00b5ef71fcfd6f8ded2b
URL:
https://github.com/kamailio/kamailio/commit/781ee072593f16a100ef00b5ef71fcf…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-03-14T11:55:34+01:00
lcr: fix building warnings initializating values
https://kamailio.sipwise.com/job/kamailiodev-nightly-binaries/architecture=…
[...]
lcr_mod.c:2630:9: warning: 'tmp_tag.len' may be used uninitialized
[-Wmaybe-uninitialized]
---
Modified: src/modules/lcr/lcr_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/781ee072593f16a100ef00b5ef71fcf…
Patch:
https://github.com/kamailio/kamailio/commit/781ee072593f16a100ef00b5ef71fcf…
---
diff --git a/src/modules/lcr/lcr_mod.c b/src/modules/lcr/lcr_mod.c
index b668160cb33..80b62f5d4c7 100644
--- a/src/modules/lcr/lcr_mod.c
+++ b/src/modules/lcr/lcr_mod.c
@@ -2526,10 +2526,21 @@ static int generate_uris(struct sip_msg *_m, char *r_uri, str
*r_uri_user,
{
int_str gw_uri_val;
struct usr_avp *gu_avp;
- str scheme, prefix, hostname, port, params, transport, addr_str, tmp_tag;
+ str scheme = STR_NULL;
+ str prefix = STR_NULL;
+ str hostname = STR_NULL;
+ str port = STR_NULL;
+ str params = STR_NULL;
+ str transport = STR_NULL;
+ str addr_str = STR_NULL;
+ str tmp_tag = STR_NULL;
char *at;
- unsigned int strip;
+ unsigned int strip = 0;
+ if(!tag) {
+ LM_ERR("tag parameter is empty\n");
+ return -1;
+ }
gu_avp = search_first_avp(gw_uri_avp_type, gw_uri_avp, &gw_uri_val, 0);
if(!gu_avp)