Skip to content

Commit

Permalink
core: fixed condition for 0 ID or NULL NAME AVP
Browse files Browse the repository at this point in the history
- avoid null in memcpy for AVP_NAME_STR

(cherry picked from commit ca18218)
  • Loading branch information
miconda committed Apr 13, 2021
1 parent 2d091fa commit aa28558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/usr_avp.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit aa28558

Please sign in to comment.