[asterisk-commits] pjproject: Add patch to fix Via IPv6 parsing (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 11 09:02:45 CDT 2016


Joshua Colp has submitted this change and it was merged.

Change subject: pjproject:  Add patch to fix Via IPv6 parsing
......................................................................


pjproject:  Add patch to fix Via IPv6 parsing

There's a bug in pjproject's sip_parser where the ":" wasn't correctly
interpreted. This is causing IPv6 addresses in the "received" parameter of the
Via header to cause a syntax check failure.

This patch was submitted to Teluu on 4/10/2016.

ASTERISK-25910 #close
Reported-by: Anthony Messina

Change-Id: Ic7e4c4aa14ded61860401ec349f5177568c4d922
---
A third-party/pjproject/patches/0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch
1 file changed, 30 insertions(+), 0 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/third-party/pjproject/patches/0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch b/third-party/pjproject/patches/0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch
new file mode 100644
index 0000000..60c27cb
--- /dev/null
+++ b/third-party/pjproject/patches/0001-sip_parser.c-Fix-pjsip_VIA_PARAM_SPEC_ESC.patch
@@ -0,0 +1,30 @@
+From 0fc7ef5f01be9cc74d184c3ca3a973ff1ef44c93 Mon Sep 17 00:00:00 2001
+From: George Joseph <george.joseph at fairview5.com>
+Date: Sun, 10 Apr 2016 12:54:06 -0600
+Subject: [PATCH] sip_parser.c: Fix pjsip_VIA_PARAM_SPEC_ESC
+
+pjsip_VIA_PARAM_SPEC_ESC should have been pjsip_TOKEN_SPEC_ESC + ":" but
+instead of appending ":" to pjsip_VIA_PARAM_SPEC_ESC it was being appended
+to pjsip_VIA_PARAM_SPEC again.  This was causing parsing of Via headers
+to fail when an ipv6 address was in a "received" param and
+PJSIP_UNESCAPE_IN_PLACE was used.  Probably just a copy/paste error.
+---
+ pjsip/src/pjsip/sip_parser.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c
+index 378c22f..c18faa3 100644
+--- a/pjsip/src/pjsip/sip_parser.c
++++ b/pjsip/src/pjsip/sip_parser.c
+@@ -327,7 +327,7 @@ static pj_status_t init_parser()
+ 
+     status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC_ESC, &pconst.pjsip_TOKEN_SPEC_ESC);
+     PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+-    pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, ":");
++    pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, ":");
+ 
+     status = pj_cis_dup(&pconst.pjsip_HOST_SPEC, &pconst.pjsip_ALNUM_SPEC);
+     PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+-- 
+2.5.5
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7e4c4aa14ded61860401ec349f5177568c4d922
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list