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

parse_platform_event

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ipmi-se.c)expand/collapse
Show more  
 1786  parse_platform_event(tvbuff_t *tvb, proto_tree *tree)
 1787  {
 1788          proto_item *ti;
 1789          proto_tree *s_tree;
 1790          tvbuff_t *next_tvb;
 1791          unsigned int stype, evtype;
 1792          const struct sensor_info *si;
 1793          const struct evtype_info *eti;
 1794          unsigned int d, b2, b3, offs;
 1795          const value_string *off_vals;
 1796   
 1797          stype = tvb_get_guint8(tvb, 1);
 1798          si = get_sensor_info(stype);
 1799          evtype = tvb_get_guint8(tvb, 3) & 0x7f;
 1800          eti = get_evtype_info(evtype);
 1801   
 1802          proto_tree_add_item(tree, hf_ipmi_se_evt_rev, tvb, 0, 1, TRUE);
 1803          proto_tree_add_uint_format_value(tree, hf_ipmi_se_evt_sensor_type, tvb, 1, 1, stype,
 1804                          "%s (0x%02x)", si->desc, stype);
 1805          proto_tree_add_item(tree, hf_ipmi_se_evt_sensor_num, tvb, 2, 1, TRUE);
 1806          ti = proto_tree_add_item(tree, hf_ipmi_se_evt_byte3, tvb, 3, 1, TRUE);
 1807          s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_byte3);
 1808          proto_tree_add_item(s_tree, hf_ipmi_se_evt_dir, tvb, 3, 1, TRUE);
 1809          proto_tree_add_uint_format(s_tree, hf_ipmi_se_evt_type, tvb, 3, 1, evtype,
 1810                          "%sEvent/Reading type: %s (0x%02x)", ipmi_dcd8(evtype, 0x7f),
 1811                          eti->desc, evtype);
 1812   
 1813          offs = tvb_get_guint8(tvb, 4);
 1814          b2 = offs >> 6;
 1815          b3 = (offs >> 4) & 0x3;
 1816          off_vals = eti->offsets ? eti->offsets : si->offsets ? si->offsets : et_empty;
 1817   
 1818          ti = proto_tree_add_item(tree, hf_ipmi_se_evt_data1, tvb, 4, 1, TRUE);
 1819          s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_evd_byte1);
 1820          proto_tree_add_uint_format(s_tree, hf_ipmi_se_evt_data1_b2, tvb, 4, 1, b2 << 6,
 1821                          "%sByte 2: %s (0x%02x)",
 1822                          ipmi_dcd8(offs, 0xc0), val_to_str(b2, eti->byte2, "Reserved"), b2);
 1823          proto_tree_add_uint_format(s_tree, hf_ipmi_se_evt_data1_b3, tvb, 4, 1, b3 << 4,
 1824                          "%sByte 3: %s (0x%02x)",
 1825                          ipmi_dcd8(offs, 0x30), val_to_str(b3, eti->byte3, "Reserved"), b3);
 1826          offs &= 0x0f;
 1827          proto_tree_add_uint_format(s_tree, hf_ipmi_se_evt_data1_offs, tvb, 4, 1, offs,
 1828                          "%sOffset: %s (0x%02x)",
 1829[+]                         ipmi_dcd8(offs, 0x0f), val_to_str(offs, off_vals, "Reserved"), offs);
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 3479.32249 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: