diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-15 19:27:21 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-15 19:27:21 +0000 |
commit | cf5bef305dd7a8e19086733e3e2be57c9971c5fe (patch) | |
tree | 6b644c18b98baa94d246b9775722b9ff30bd294c | |
parent | cdd659449507c4d4cd1dc1dd8a076f9754febbd9 (diff) |
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
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@218689 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 30d5eecff..3e979a46a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2686,7 +2686,7 @@ static int proxy_update(struct sip_proxy *proxy) 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; } |