Module: kamailio
Branch: master
Commit: 497b6ad2cee8481ba1f3568ed7d8a836e508016a
URL:
https://github.com/kamailio/kamailio/commit/497b6ad2cee8481ba1f3568ed7d8a83…
Author: Hugh Waite <hugh.waite(a)acision.com>
Committer: Hugh Waite <hugh.waite(a)acision.com>
Date: 2015-05-18T17:00:08+01:00
core: Fix crash in xavp.c
- Inserting an xavp into a list can crash when inserting XTYPE_NULL padding entries
---
Modified: xavp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/497b6ad2cee8481ba1f3568ed7d8a83…
Patch:
https://github.com/kamailio/kamailio/commit/497b6ad2cee8481ba1f3568ed7d8a83…
---
diff --git a/xavp.c b/xavp.c
index 1906fd8..a6c62e7 100644
--- a/xavp.c
+++ b/xavp.c
@@ -723,8 +723,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;