Revert "MT#63079 Add check for avp name initialization"

This reverts commit 2000c2e5b5.

Reason for revert: The problem seems to be with the AVP on the configuration. Also, this check is already done before arriving at this place.

Change-Id: I0be5dd920c0cff606d4d5758908214c9fd5c7446
pull/12/head
Fabricio Santolin da Silva 10 months ago
parent 0f8095b32c
commit 9df884d0ee

@ -44,7 +44,6 @@ sipwise/usrloc-don-t-synchronize-on-destroy-for-DB_ONLY.patch
sipwise/presence_offline_cleanup.patch sipwise/presence_offline_cleanup.patch
### active development ### active development
sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch
sipwise/add_check_avp_name.patch
### Don't just put stuff in any order ### Don't just put stuff in any order
### use gbp pq import/export tooling to help maintain patches ### use gbp pq import/export tooling to help maintain patches
### ###

@ -1,23 +0,0 @@
From: Sipwise Development Team <support@sipwise.com>
Date: Mon, 7 Jul 2025 16:31:45 +0200
Subject: add_check_avp_name
---
src/core/usr_avp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/core/usr_avp.c b/src/core/usr_avp.c
index d189669..aafe7e7 100644
--- a/src/core/usr_avp.c
+++ b/src/core/usr_avp.c
@@ -391,6 +391,10 @@ static inline int match_by_id(avp_t *avp, avp_id_t id)
static inline int match_by_name(avp_t *avp, avp_id_t id, str *name)
{
str *avp_name;
+ if (!name || !name->s || name->len <= 0) {
+ LM_ERR("Invalid AVP name pointer\n");
+ return 0;
+ }
if(id == avp->id && avp->flags & AVP_NAME_STR
&& (avp_name = get_avp_name(avp)) != 0 && avp_name->len == name->len
&& !strncasecmp(avp_name->s, name->s, name->len)) {
Loading…
Cancel
Save