[asterisk-commits] dvossel: branch 1.6.0 r218690 - in /branches/1.6.0: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 15 14:31:11 CDT 2009


Author: dvossel
Date: Tue Sep 15 14:31:07 2009
New Revision: 218690

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218690
Log:
Merged revisions 218687 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r218687 | dvossel | 2009-09-15 14:22:37 -0500 (Tue, 15 Sep 2009) | 2 lines
  
  upward bound checking for port string to int conversion
........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/channels/chan_sip.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=218690&r1=218689&r2=218690
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Tue Sep 15 14:31:07 2009
@@ -2466,7 +2466,7 @@
 static int port_str2int(const char *pt, unsigned int standard)
 {
 	int port = standard;
-	if (ast_strlen_zero(pt) || (sscanf(pt, "%30d", &port) != 1) || (port < 0)) {
+	if (ast_strlen_zero(pt) || (sscanf(pt, "%30d", &port) != 1) || (port < 1) || (port > 65535)) {
 		port = standard;
 	}
 




More information about the asterisk-commits mailing list