Module: sems Branch: master Commit: 8402e4900ce8a716d0f1dd29900373e8496d00e3 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=8402e4900ce8a716d0f1dd29900373e8496d00e3
Author: Raphael Coeffic <[email protected]> Committer: Raphael Coeffic <[email protected]> Date: Tue Feb 7 10:30:26 2012 +0100 b/f: SIP version parser should be case-insensitive. --- core/sip/parse_common.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/core/sip/parse_common.cpp b/core/sip/parse_common.cpp index 69f51e5..0150f96 100644 --- a/core/sip/parse_common.cpp +++ b/core/sip/parse_common.cpp @@ -57,7 +57,10 @@ int parse_sip_version(const char* beg, int len) return MALFORMED_SIP_MSG; } - if(memcmp(c,SIP,SIP_len) != 0){ + if( ((c[0] != 'S')&&(c[0] != 's')) || + ((c[1] != 'I')&&(c[1] != 'i')) || + ((c[2] != 'P')&&(c[2] != 'p')) ) { + DBG("SIP-Version does not begin with \"SIP\"\n"); return MALFORMED_SIP_MSG; } _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
