Module: kamailio
Branch: master
Commit: c5dca6096785296c89acbfa4b2f7a7fd8a16d9a2
URL:
https://github.com/kamailio/kamailio/commit/c5dca6096785296c89acbfa4b2f7a7f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-06-10T17:07:08+02:00
textops: filter_body() remove previous \r\n that belongs to the boundary
we were removing only '--boundary\r\n' but we must remove
'\r\n--boundary\r\n'
---
Modified: modules/textops/textops.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c5dca6096785296c89acbfa4b2f7a7f…
Patch:
https://github.com/kamailio/kamailio/commit/c5dca6096785296c89acbfa4b2f7a7f…
---
diff --git a/modules/textops/textops.c b/modules/textops/textops.c
index 400b836..99a4da8 100644
--- a/modules/textops/textops.c
+++ b/modules/textops/textops.c
@@ -973,7 +973,8 @@ static int filter_body_f(struct sip_msg* msg, char* _content_type,
if (find_line_start(boundary.s, boundary.len, &start,
&len))
{
- if (del_lump(msg, start - msg->buf, len, 0) == 0)
+ /* we need to remove \r\n too */
+ if (del_lump(msg, (start-2) - msg->buf, len+2, 0) == 0)
{
LM_ERR("deleting lump <%.*s> failed\n", len, start);
goto err;