projects
/
kamailio
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d091fa
)
core: fixed condition for 0 ID or NULL NAME AVP
author
Daniel-Constantin Mierla
<miconda@gmail.com>
Mon, 5 Apr 2021 15:23:59 +0000
(17:23 +0200)
committer
Daniel-Constantin Mierla
<miconda@gmail.com>
Tue, 13 Apr 2021 06:23:33 +0000
(08:23 +0200)
- avoid null in memcpy for AVP_NAME_STR
(cherry picked from commit
ca1821837dfe7dd6630f628d968ed4d1178c7040
)
src/core/usr_avp.c
patch
|
blob
|
history
diff --git
a/src/core/usr_avp.c
b/src/core/usr_avp.c
index
82183e3
..
e80e52d
100644
(file)
--- 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;
}