diff --git a/debian/patches/series b/debian/patches/series index 117f2620a..96c9c83fc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -35,6 +35,8 @@ sipwise/sca-add-pai_avp-parameter.patch # ## upstream master upstream/rtpengine_rework_rtpp_flags.patch +upstream/cfgutils-expose-optional-second-string-key-for-lock.patch +upstream/cfgutils-initialize-the-optional-key.patch ### relevant for upstream sipwise/dialplan-don-t-stop-loading-rules-on-error.patch sipwise/kamctl-TMPDIR-config.patch @@ -44,7 +46,6 @@ sipwise/lcr_read_id.patch sipwise/dialog-support-profile_get_size-for-all-profiles.patch sipwise/presence_vqr.patch sipwise/dialog-dlg_get_ttag.patch -sipwise/cfgutils-expose-optional-second-string-key-for-lock.patch sipwise/app_lua_sr-support-second-str-for-cfgutils-lock.patch ### active development # diff --git a/debian/patches/sipwise/cfgutils-expose-optional-second-string-key-for-lock.patch b/debian/patches/upstream/cfgutils-expose-optional-second-string-key-for-lock.patch similarity index 100% rename from debian/patches/sipwise/cfgutils-expose-optional-second-string-key-for-lock.patch rename to debian/patches/upstream/cfgutils-expose-optional-second-string-key-for-lock.patch diff --git a/debian/patches/upstream/cfgutils-initialize-the-optional-key.patch b/debian/patches/upstream/cfgutils-initialize-the-optional-key.patch new file mode 100644 index 000000000..7dfaf2ce2 --- /dev/null +++ b/debian/patches/upstream/cfgutils-initialize-the-optional-key.patch @@ -0,0 +1,32 @@ +From: Victor Seva +Date: Thu, 18 Apr 2024 15:29:39 +0200 +Subject: cfgutils: initialize the optional key + +* bug introduced at 424769743c93dea5a4d2c21f7a0ef8ea8779a5bb +--- + src/modules/cfgutils/cfgutils.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/modules/cfgutils/cfgutils.c b/src/modules/cfgutils/cfgutils.c +index 6887af7..f20f3bb 100644 +--- a/src/modules/cfgutils/cfgutils.c ++++ b/src/modules/cfgutils/cfgutils.c +@@ -679,7 +679,7 @@ static int cfg_lock_helper(str *lkey, str *lkey2, int mode) + unsigned int pos; + str *key2 = NULL; + +- if(lkey2 && lkey2->len > 0) { ++ if(lkey2 && lkey2->s && lkey2->len > 0) { + key2 = lkey2; + } + +@@ -758,7 +758,8 @@ static int cfg_trylock_key2(sip_msg_t *msg, str *lkey, str *lkey2) + static int w_cfg_lock_wrapper( + struct sip_msg *msg, gparam_p key, gparam_p key2, int mode) + { +- str s1, s2; ++ str s1; ++ str s2 = STR_NULL; + if(key == NULL) { + return -1; + }