Module: kamailio
Branch: 4.2
Commit: 129e1456bd5369912690245b5a21b0591ead51f4
URL:
https://github.com/kamailio/kamailio/commit/129e1456bd5369912690245b5a21b05…
Author: Hugh Waite <hugh.waite(a)acision.com>
Committer: Hugh Waite <hugh.waite(a)acision.com>
Date: 2015-05-18T17:53:57+01:00
core: Fix crash in xavp.c
- Inserting an xavp into a list can crash when inserting XTYPE_NULL padding entries
(cherry picked from commit 497b6ad2cee8481ba1f3568ed7d8a836e508016a)
---
Modified: xavp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/129e1456bd5369912690245b5a21b05…
Patch:
https://github.com/kamailio/kamailio/commit/129e1456bd5369912690245b5a21b05…
---
diff --git a/xavp.c b/xavp.c
index 0d73fd3..f7cb360 100644
--- a/xavp.c
+++ b/xavp.c
@@ -725,8 +725,7 @@ int xavp_insert(sr_xavp_t *xavp, int idx, sr_xavp_t **list)
if(crt==NULL)
return -1;
if (lst == NULL) {
- crt->next = *list;
- *list = crt;
+ xavp_add(crt, list);
} else {
crt->next = lst->next;
lst->next = crt;