Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at conversations_table.c:1662

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

add_conversation_table_data

(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/conversations_table.c)expand/collapse
Show more  
 1615  add_conversation_table_data(conversations_table *ct, const address *src, const address *dst, guint32 src_port, guint32 dst_port, int num_frames, int num_bytes, nstime_t *ts, SAT_E sat, int port_type)
 1616  {
 1617      const address *addr1, *addr2;
 1618      guint32 port1, port2;
 1619      conv_t *conversation=NULL;
 1620      int conversation_idx=0;
 1621      gboolean new_conversation;
 1622   
 1623      if(src_port>dst_port){
 1624          addr1=src;
 1625          addr2=dst;
 1626          port1=src_port;
 1627          port2=dst_port;
 1628      } else if(src_port<dst_port){
 1629          addr2=src;
 1630          addr1=dst;
 1631          port2=src_port;
 1632          port1=dst_port;
 1633      } else if(CMP_ADDRESS(src, dst)<0){
 1634          addr1=src;
 1635          addr2=dst;
 1636          port1=src_port;
 1637          port2=dst_port;
 1638      } else {
 1639          addr2=src;
 1640          addr1=dst;
 1641          port2=src_port;
 1642          port1=dst_port;
 1643      }
 1644   
 1645   
 1646      new_conversation=FALSE;
 1647      /* XXX should be optimized to allocate n extra entries at a time
 1648         instead of just one */
 1649      /* if we dont have any entries at all yet */
 1650      if(ct->conversations==NULL){
 1651          ct->conversations=g_malloc(sizeof(conv_t));
 1652          ct->num_conversations=1;
 1653          conversation=&ct->conversations[0];
 1654          conversation_idx=0;
 1655          new_conversation=TRUE;
 1656      }
 1657   
 1658      /* try to find it among the existing known conversations */
 1659      if(conversation==NULL){
 1660          guint32 i;
 1661          for(i=0;i<ct->num_conversations;i++){
 1662              if(  (!CMP_ADDRESS(&ct->conversations[i].src_address, addr1))&&(!CMP_ADDRESS(&ct->conversations[i].dst_address, addr2))&&(ct->conversations[i].src_port==port1)&&(ct->conversations[i].dst_port==port2) ){
Show more  




Change Warning 4037.30944 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: