- avoid null in memcpy for AVP_NAME_STR
(cherry picked from commit ca1821837dfe7dd6630f628d968ed4d1178c7040)
(cherry picked from commit aa285587c015e03a105442b1964ac0dd1dc52f1f)
... | ... |
@@ -148,7 +148,7 @@ avp_t *create_avp (avp_flags_t flags, avp_name_t name, avp_value_t val) |
148 | 148 |
struct str_str_data *ssd; |
149 | 149 |
int len; |
150 | 150 |
|
151 |
- if (name.s.s == 0 && name.s.len == 0) { |
|
151 |
+ if (name.s.s == NULL || name.s.len == 0) { |
|
152 | 152 |
LM_ERR("0 ID or NULL NAME AVP!"); |
153 | 153 |
goto error; |
154 | 154 |
} |