Module: kamailio Branch: master Commit: ca1821837dfe7dd6630f628d968ed4d1178c7040 URL: https://github.com/kamailio/kamailio/commit/ca1821837dfe7dd6630f628d968ed4d1...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-04-05T17:23:59+02:00
core: fixed condition for 0 ID or NULL NAME AVP
- avoid null in memcpy for AVP_NAME_STR
---
Modified: src/core/usr_avp.c
---
Diff: https://github.com/kamailio/kamailio/commit/ca1821837dfe7dd6630f628d968ed4d1... Patch: https://github.com/kamailio/kamailio/commit/ca1821837dfe7dd6630f628d968ed4d1...
---
diff --git a/src/core/usr_avp.c b/src/core/usr_avp.c index 82183e3b28..e80e52d79d 100644 --- a/src/core/usr_avp.c +++ b/src/core/usr_avp.c @@ -148,7 +148,7 @@ avp_t *create_avp (avp_flags_t flags, avp_name_t name, avp_value_t val) struct str_str_data *ssd; int len;
- if (name.s.s == 0 && name.s.len == 0) { + if (name.s.s == NULL || name.s.len == 0) { LM_ERR("0 ID or NULL NAME AVP!"); goto error; }