[Asterisk-code-review] chan sip: Fix From header truncation for extremely long CALL... (asterisk[11])

Richard Mudgett asteriskteam at digium.com
Thu Sep 17 12:09:13 CDT 2015


Richard Mudgett has posted comments on this change.

Change subject: chan_sip: Fix From header truncation for extremely long CALLERID(name).
......................................................................


Patch Set 1: Code-Review-1

(5 comments)

https://gerrit.asterisk.org/#/c/1269/1/channels/chan_sip.c
File channels/chan_sip.c:

Line 13921: 		ast_log(LOG_ERROR, "The From header was truncated. This call setup will fail.\n");
Put the p->callid in the message so you have some tracing of which call will fail.


Line 13928: 		if (left >= 0) {
Should just be if (left > 0)
If left is 0 then you only have room for the quotes and nothing else so why bother putting empty quotes there?


Line 13932: 				left = strlen(n);
Remove this line.  It is in the wrong place.


Line 13934: 			memmove(from + left + 3, from, written + 1);
if (strlen(n) < left) {
  left = strlen(n);
}
memmove()


Line 13998: 		ast_log(LOG_ERROR, "The To header was truncated. This call setup will fail.\n");
Put the p->callid in the message so you have some tracing of which call will fail.


-- 
To view, visit https://gerrit.asterisk.org/1269
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I33632baf024f01b6a00f8c7f35c91e5f68c40260
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list