From 4efcad90d4b16192972e10e65b132f5259c1b9b5 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 5 Feb 2025 11:31:21 +0100 Subject: [PATCH] MT#62023 htable: don't crash on missing htable definition Change-Id: Ie31517cc78ee0bb2c5541cb5410981d466e6ae88 (cherry picked from commit 2e3184c2f56105d129f6a3683242d5446c2a5d35) (cherry picked from commit 544b6de3c5d86ce34e4ebc673f6e5952110b0259) (cherry picked from commit 3d966e95e49c91879bba500fe3b58ff04a3d3356) (cherry picked from commit f5ddf21eccc4cbb00ee7c9138478df999e25e96b) --- debian/patches/series | 1 + ...t-print-item-name-before-is-computed.patch | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 debian/patches/upstream/htable-do-not-print-item-name-before-is-computed.patch diff --git a/debian/patches/series b/debian/patches/series index 829e89f3a..a26e5682f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -36,6 +36,7 @@ upstream/0002-db_mysql-switch-warn-to-dbg-for-log-messages-for-opt.patch upstream/regex-remove-pcre2_free-warning.patch upstream/lcr-remove-pcre2_free-warning.patch upstream/dialplan-remove-pcre2_free-warning.patch +upstream/htable-do-not-print-item-name-before-is-computed.patch ## upstream master upstream/rtpengine_rework_rtpp_flags.patch upstream/cfgutils-expose-optional-second-string-key-for-lock.patch diff --git a/debian/patches/upstream/htable-do-not-print-item-name-before-is-computed.patch b/debian/patches/upstream/htable-do-not-print-item-name-before-is-computed.patch new file mode 100644 index 000000000..ed17e111d --- /dev/null +++ b/debian/patches/upstream/htable-do-not-print-item-name-before-is-computed.patch @@ -0,0 +1,35 @@ +From: Daniel-Constantin Mierla +Date: Thu, 11 Jul 2024 19:38:24 +0200 +Subject: [PATCH] htable: do not print item name before is computed + +(cherry picked from commit e2193b9cd7f59377c54e0424c0d4a1628a5a60de) +--- + src/modules/htable/ht_var.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/modules/htable/ht_var.c b/src/modules/htable/ht_var.c +index e79c786..4d7707f 100644 +--- a/src/modules/htable/ht_var.c ++++ b/src/modules/htable/ht_var.c +@@ -38,8 +38,8 @@ int pv_get_ht_cell(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) + if(hpv->ht == NULL) { + hpv->ht = ht_get_table(&hpv->htname); + if(hpv->ht == NULL) { +- LM_ERR("htable not found for getting $sht(%.*s=>%.*s)\n", +- hpv->htname.len, hpv->htname.s, htname.len, htname.s); ++ LM_ERR("htable not found for getting $sht(%.*s=>...)\n", ++ hpv->htname.len, hpv->htname.s); + return pv_get_null(msg, param, res); + } + } +@@ -77,8 +77,8 @@ int pv_set_ht_cell( + if(hpv->ht == NULL) + hpv->ht = ht_get_table(&hpv->htname); + if(hpv->ht == NULL) { +- LM_ERR("htable not found for setting $sht(%.*s=>%.*s)\n", +- hpv->htname.len, hpv->htname.s, htname.len, htname.s); ++ LM_ERR("htable not found for setting $sht(%.*s=>...)\n", ++ hpv->htname.len, hpv->htname.s); + return -1; + } +