Browse code

core: fixed condition for 0 ID or NULL NAME AVP

- avoid null in memcpy for AVP_NAME_STR

Daniel-Constantin Mierla authored on 05/04/2021 15:23:59
Showing 1 changed files
... ...
@@ -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
 	}