Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Control Flow  at packet-hilscher.c:168

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

dissect_hilscher_heur

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-hilscher.c)expand/collapse
Show more  
 133  dissect_hilscher_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 134  {
 135          guint       info_type;
 136          gint        offset;
 137   
 138          /* Check that there's enough data */
 139          if (tvb_length(tvb) < 14)
 140                  return FALSE;
 141   
 142          /* check for Hilscher frame, this has a unique source MAC from Hilscher range and ethertype 0x88ff
 143             First 14 bytes must be: xx xx xx xx xx xx 00 02 a2 ff ff ff 88 ff */
 144          if ((tvb_get_guint8(tvb, 6) == 0x00) &&
 145              (tvb_get_guint8(tvb, 7) == 0x02) &&
 146              (tvb_get_guint8(tvb, 8) == 0xa2) &&
 147              (tvb_get_guint8(tvb, 9) == 0xff) &&
 148              (tvb_get_guint8(tvb, 10) == 0xff) &&
 149              (tvb_get_guint8(tvb, 11) == 0xff) &&
 150              (tvb_get_guint8(tvb, 12) == 0x88) &&
 151              (tvb_get_guint8(tvb, 13) == 0xff) )
 152          {
 153   
 154                  /* determine type of analyzer */
 155                  offset = INFO_TYPE_OFFSET;
 156                  info_type = tvb_get_guint8(tvb, offset);
 157   
 158                  switch (info_type)
 159                  {
 160                  /* this is a netANALYZER frame */
 161                  case 0x00:
 162                          dissect_hilscher_netanalyzer(tvb, pinfo, tree, offset);
 163                          break;
 164   
 165                  /* this is no Hilscher analyzer frame */
 166                  default:
 167                          return FALSE;
 168                          break;
 169                  }
 170   
 171          }
 172          else 
 173          {
 174                  /* this is no Hilscher analyzer frame */
 175                  return FALSE;
 176          }
 177   
 178            return TRUE;
 179  }
Show more  




Change Warning 2635.33414 : Unreachable Control Flow

Priority:
State:
Finding:
Owner:
Note: