Module: kamailio
Branch: master
Commit: 13a4021914057ca66eaa91e2ea022e1827963b70
URL:
https://github.com/kamailio/kamailio/commit/13a4021914057ca66eaa91e2ea022e1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-04T11:50:50+02:00
dispatcher: check if packing address fails on removing via rpc
- GH #3199
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/13a4021914057ca66eaa91e2ea022e1…
Patch:
https://github.com/kamailio/kamailio/commit/13a4021914057ca66eaa91e2ea022e1…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index d19098800a..7d818538d6 100644
--- a/src/modules/dispatcher/dispatch.c
+++ b/src/modules/dispatcher/dispatch.c
@@ -2680,6 +2680,11 @@ int ds_remove_dst(int group, str *address)
setn = 0;
dp = pack_dest(*address, 0, 0, NULL, 0);
+ if(dp==NULL) {
+ LM_ERR("failed to pack address: %d %.*s\n", group,
+ address->len, address->s);
+ return -1;
+ }
filter_arg.setid = group;
filter_arg.dest = dp;
filter_arg.setn = &setn;