[asterisk-commits] file: branch 1.4 r99301 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 22 10:39:32 CST 2008


Author: file
Date: Mon Jan 21 10:01:00 2008
New Revision: 99301

URL: http://svn.digium.com/view/asterisk?view=rev&rev=99301
Log:
Bump the buffer size for Via headers up to 512. There are some exceptionally large Via headers out there.
(closes issue #11783)
Reported by: ofirroval

Modified:
    branches/1.4/channels/chan_sip.c

Change Statistics:
 branches/1.4/channels/chan_sip.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=99301&r1=99300&r2=99301
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Jan 21 10:01:00 2008
@@ -5624,14 +5624,14 @@
 	int start = 0;
 
 	for (;;) {
-		char new[256];
+		char new[512];
 		const char *oh = __get_header(orig, field, &start);
 
 		if (ast_strlen_zero(oh))
 			break;
 
 		if (!copied) {	/* Only check for empty rport in topmost via header */
-			char leftmost[256], *others, *rport;
+			char leftmost[512], *others, *rport;
 
 			/* Only work on leftmost value */
 			ast_copy_string(leftmost, oh, sizeof(leftmost));
@@ -9125,7 +9125,7 @@
 /*! \brief check Via: header for hostname, port and rport request/answer */
 static void check_via(struct sip_pvt *p, struct sip_request *req)
 {
-	char via[256];
+	char via[512];
 	char *c, *pt;
 	struct hostent *hp;
 	struct ast_hostent ahp;




More information about the asterisk-commits mailing list