Text   |  XML   |  ReML   |   Visible Warnings:

Useless Assignment  at packet-ipsec.c:724

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

esp_sa_parse_protocol_typ

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ipsec.c)expand/collapse
Show more  
 702  esp_sa_parse_protocol_typ(const gchar *sa, guint index_start, gint *pt_protocol_typ, guint *index_end)
 703  {
 704    gboolean done_flag = FALSE;
 705   
 706    *pt_protocol_typ = IPSEC_SA_UNKNOWN;
 707    if((sa == NULL) || (strlen(&sa[index_start]) <= IPSEC_TYP_LEN) ||
 708        (sa[index_start + IPSEC_TYP_LEN] != IPSEC_SA_SEPARATOR))
 709      return FALSE;
 710   
 711    if(g_ascii_strncasecmp(&sa[index_start], "IPV6", IPSEC_TYP_LEN) == 0)
 712      {
 713        *pt_protocol_typ = IPSEC_SA_IPV6;
 714        done_flag = TRUE;
 715      }
 716    else if (g_ascii_strncasecmp(&sa[index_start], "IPV4", IPSEC_TYP_LEN) == 0)
 717      {
 718        *pt_protocol_typ = IPSEC_SA_IPV4;
 719        done_flag = TRUE;
 720      }
 721    else 
 722      {
 723        *pt_protocol_typ = IPSEC_SA_UNKNOWN;
 724        done_flag = FALSE;
 725      }
 726   
 727    *index_end = IPSEC_TYP_LEN + index_start + 1;
 728   
 729  /* g_warning("For %s returning %d, %c, %d", sa, *pt_protocol_typ, sa[*index_end], *index_end); */
 730    return done_flag;
 731  }
Show more  




Change Warning 2686.29654 : Useless Assignment

Priority:
State:
Finding:
Owner:
Note: