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_PNDCP_Option

(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/profinet/packet-pn-dcp.c)expand/collapse
Show more  
 298  dissect_PNDCP_Option(tvbuff_t *tvb, int offset, packet_info *pinfo,  
 299                               proto_tree *tree, proto_item *block_item, int hfindex, gboolean append_col)
 300  {
 301      guint8 option;
 302      guint8 suboption;
 303      const value_string *val_str;
 304   
 305      offset = dissect_pn_uint8 (tvb, offset, pinfo, tree, hfindex, &option);
 306      switch(option) {
 307      case(PNDCP_OPTION_IP):
 308          offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_ip, &suboption);
 309          val_str = pn_dcp_suboption_ip;
 310          break;
 311      case(PNDCP_OPTION_DEVICE):
 312          offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_device, &suboption);
 313          val_str = pn_dcp_suboption_device;
 314          break;
 315      case(PNDCP_OPTION_DHCP):
 316          offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_dhcp, &suboption);
 317          val_str = pn_dcp_suboption_dhcp;
 318          break;
 319      case(PNDCP_OPTION_CONTROL):
 320          offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_control, &suboption);
 321          val_str = pn_dcp_suboption_control;
 322          break;
 323      case(PNDCP_OPTION_DEVICEINITIATIVE):
 324          offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_deviceinitiative, &suboption);
 325          val_str = pn_dcp_suboption_deviceinitiative;
 326          break;
 327      case(PNDCP_OPTION_ALLSELECTOR):
 328          offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_all, &suboption);
 329          val_str = pn_dcp_suboption_all;
 330          break;
 331      default:
 332          offset = dissect_pn_uint8(tvb, offset, pinfo, tree, hf_pn_dcp_suboption_manuf, &suboption);
 333          val_str = pn_dcp_suboption_manuf;
 334      }
 335   
 336      proto_item_append_text(block_item, ", Status from %s - %s",  
 337[+]         val_to_str(option, pn_dcp_option, "Unknown"), val_to_str(suboption, val_str, "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  
Show more  




Change Warning 3878.31476 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: