]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Wed May 13 11:07:04 CDT 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Fri, 15 May 2009 16:06:43 +0000 (16:06 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 15 May 2009 16:06:43 +0000 (16:06 +0000)
  * sip-dig.c: fixed buffer overrun
  Ignore-this: d8776bd28ef951602449e87d80dc20e7

  Coverity issue.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13338 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/utils/sip-dig.c

index 185e7780961276a377209423d1bfb5d0e9c38db1..5991417be95b62810294e4cf57dfd6c97a45a102 100644 (file)
@@ -1 +1 @@
-Fri May 15 11:05:48 CDT 2009
+Fri May 15 11:06:28 CDT 2009
index db00075fc4955ecce29f9f945aff6549b6b5ff99..47e6b3f49a4e915dc05cfdb3efbfc0346741ecdd 100644 (file)
@@ -52,7 +52,6 @@
  * The @e sip-dig utility accepts following command line options:
  * <dl>
  * <dt>-p <em>protoname</em></dt>
-
  * <dd>Use named transport protocol. The <em>protoname</em> can be either
  * well-known, e.g., "udp", or it can specify NAPTR service and SRV
  * identifier, e.g., "tls-udp/SIPS+D2U/_sips._udp.".
@@ -160,7 +159,7 @@ struct dig {
 
   unsigned preference, ip4, ip6, sips, print;
 
-  struct transport tports[N_TPORT];
+  struct transport tports[N_TPORT + 1];
 };
 
 int dig_naptr(struct dig *dig, char const *host, double weight);
@@ -370,7 +369,7 @@ int prepare_transport(struct dig *dig, char const *tport)
   struct transport *tports = dig->tports;
   int j;
 
-  for (j = 0; j < N_TPORT - 1; j++) {
+  for (j = 0; j < N_TPORT; j++) {
     if (!tports[j].name)
       break;
     if (su_casematch(tports[j].name, tport))