Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at value_string.c:61

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

dissect_wlccp

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-wlccp.c)expand/collapse
Show more  
 700  dissect_wlccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 701  {
 702          /* Set up structures needed to add the protocol subtree and manage it */
 703          proto_item *ti;
 704          proto_tree *wlccp_tree, *wlccp_sap_tree, *wlccp_type_tree;
 705   
 706          guint offset = 0, old_offset;
 707   
 708          guint8 version=0, sap=0, sap_id=0, sap_version=0;
 709   
 710          guint16 type;
 711          guint8 base_message_type=0, message_sub_type=0;
 712   
 713          /* Make entries in Protocol column and Info column on summary display */
 714[+]         if (check_col(pinfo->cinfo, COL_PROTOCOL))  
 715                  col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLCCP");
 716   
 717[+]         if (check_col(pinfo->cinfo, COL_INFO))
 718          {
 719[+]                 if(tvb_get_guint8(tvb, 0) == 0xC1)  /* Get the version number */
 720                  {
 721   
 722                          sap_version = (tvb_get_guint8(tvb,1) & SAP_VERSION_MASK) >> 6;
 723                          sap_id = tvb_get_guint8(tvb,1) & SAP_VALUE_MASK;
 724                          base_message_type=(tvb_get_guint8(tvb,6)) & MT_BASE_MSG_TYPE;
 725                          message_sub_type=(tvb_get_guint8(tvb, 6) &  MT_SUBTYPE ) >> 6;
 726   
 727   
 728                          switch (sap_id)
 729                          {
 730   
 731                                  case WLCCP_SAP_CCM:
 732                                  {
 733   
 734                                          col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
 735                                                  val_to_str(base_message_type, wlccp_msg_type_vs_0, "Unknown"),
 736                                                  val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
 737                                          );
 738                                          break;
 739   
 740                                  } /* case WLCCP_SAP_CCM */
 741   
 742                                  case WLCCP_SAP_SEC:
 743                                  {
 744   
 745                                          col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
 746[+]                                                 val_to_str(base_message_type, wlccp_msg_type_vs_1, "Unknown"),
expand/collapse

val_to_str

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/value_string.c)expand/collapse
Show more  
 39  const gchar*
 40  val_to_str(guint32 val, const value_string *vs, const char *fmt) {
 41    const gchar *ret;
 42   
 43    g_assert(fmt != NULL);
 44   
 45[+]   ret = match_strval(val, vs);
expand/collapse

match_strval

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/value_string.c)expand/collapse
Show more  
 75  const gchar*
 76  match_strval(guint32 val, const value_string *vs) {
 77      gint ignore_me;
 78[+]     return match_strval_idx(val, vs, &ignore_me);
expand/collapse

match_strval_idx

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/value_string.c)expand/collapse
Show more  
 56  const gchar*
 57  match_strval_idx(guint32 val, const value_string *vs, gint *idx) {
 58    gint i = 0;
 59   
 60    if(vs) {
 61      while (vs[i].strptr) {
 62        if (vs[i].value == val) {
 63          *idx = i;
 64          return(vs[i].strptr);
 65        }
 66        i++;
Show more  
Show more  
Show more  
 747                                                  val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
Show more  




Change Warning 3056.34159 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: