[Freeswitch-svn] [commit] r13331 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/tport

FreeSWITCH SVN mikej at freeswitch.org
Fri May 15 09:01:31 PDT 2009


Author: mikej
Date: Fri May 15 11:01:31 2009
New Revision: 13331

Log:
Tue May 12 13:23:33 CDT 2009  Pekka Pessi <first.last at nokia.com>
  * tport.c: do not use out-of-scope array in tport_deliver()
  Ignore-this: a651d5eb213850d9dfd317102a432f8e
  
  Coverity issue.


Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c

Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Fri May 15 11:01:31 2009
@@ -1 +1 @@
-Fri May 15 10:59:42 CDT 2009
+Fri May 15 11:01:11 CDT 2009

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	Fri May 15 11:01:31 2009
@@ -2952,6 +2952,7 @@
   tport_t *ref;
   int error;
   struct tport_delivery *d;
+  char ipaddr[SU_ADDRSIZE + 2];
 
   assert(msg);
 
@@ -2962,7 +2963,6 @@
   *d->d_from = *self->tp_name;
 
   if (tport_is_primary(self)) {
-    char ipaddr[SU_ADDRSIZE + 2];
     su_sockaddr_t const *su = msg_addr(msg);
 
 #if SU_HAVE_IN6
@@ -3005,16 +3005,16 @@
 
   ref = tport_incref(self);
 
-
   if (self->tp_pri->pri_vtable->vtp_deliver) {
     self->tp_pri->pri_vtable->vtp_deliver(self, msg, now);
   }
   else
     tport_base_deliver(self, msg, now);
 
-  tport_decref(&ref);
-
+  memset(d->d_from, 0, sizeof d->d_from);
   d->d_msg = NULL;
+
+  tport_decref(&ref);
 }
 
 /** Pass message to the protocol stack */



More information about the Freeswitch-svn mailing list