mirror of https://github.com/sipwise/kamailio.git
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
parent
0f8095b32c
commit
9df884d0ee
@ -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…
Reference in new issue