Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at packet-smb-pipe.c:288

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

add_byte_param

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-smb-pipe.c)expand/collapse
Show more  
 278  add_byte_param(tvbuff_t *tvb, int offset, int count, packet_info *pinfo _U_,
 279      proto_tree *tree, int convert _U_, int hf_index)
 280  {
 281          guint8 BParam;
 282          header_field_info *hfinfo;
 283   
 284          if (hf_index != -1) {
 285                  hfinfo = proto_registrar_get_nth(hf_index);
 286                  if (hfinfo && count != 1 &&
 287                                  (hfinfo->type == FT_INT8 || hfinfo->type == FT_UINT8)
 288                                  && count != 1) {
 289                          THROW(ReportedBoundsError);
 290                  }
 291                  proto_tree_add_item(tree, hf_index, tvb, offset, count, TRUE);
 292          } else {
 293                  if (count == 1) {
 294                          BParam = tvb_get_guint8(tvb, offset);
 295                          proto_tree_add_text(tree, tvb, offset, count,
 296                              "Byte Param: %u (0x%02X)",
 297                              BParam, BParam);
 298                  } else {
 299                          proto_tree_add_text(tree, tvb, offset, count,
 300                              "Byte Param: %s",
 301                              tvb_bytes_to_str(tvb, offset, count));
 302                  }
 303          }
 304          offset += count;
 305          return offset;
 306  }
Show more  




Change Warning 2956.31932 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: