Module: kamailio Branch: 4.2 Commit: cd42ec08027349be350b40e78bb5fff98ed32527 URL: https://github.com/kamailio/kamailio/commit/cd42ec08027349be350b40e78bb5fff9...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2015-05-19T09:35:33+02:00
core: safety check for linker when inserting xavp with index
(cherry picked from commit ec438b45696e17af0a3b19bb7ac12b221f897517)
---
Modified: xavp.c
---
Diff: https://github.com/kamailio/kamailio/commit/cd42ec08027349be350b40e78bb5fff9... Patch: https://github.com/kamailio/kamailio/commit/cd42ec08027349be350b40e78bb5fff9...
---
diff --git a/xavp.c b/xavp.c index f7cb360..3d12f49 100644 --- a/xavp.c +++ b/xavp.c @@ -733,6 +733,10 @@ int xavp_insert(sr_xavp_t *xavp, int idx, sr_xavp_t **list) lst = crt; }
+ if(lst==NULL) { + LM_ERR("cannot link the xavp\n"); + return -1; + } xavp->next = lst->next; lst->next = xavp;