Module: kamailio
Branch: 5.6
Commit: 3e2cf002f544c438a7bcdcff8986b0a28c5921a8
URL:
https://github.com/kamailio/kamailio/commit/3e2cf002f544c438a7bcdcff8986b0a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-16T11:58:41+02:00
dispatcher: check if packing address fails on removing via rpc
- GH #3199
(cherry picked from commit 13a4021914057ca66eaa91e2ea022e1827963b70)
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3e2cf002f544c438a7bcdcff8986b0a…
Patch:
https://github.com/kamailio/kamailio/commit/3e2cf002f544c438a7bcdcff8986b0a…
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c
index d19098800a3..7d818538d61 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;