Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-gsm_sms.c:3171

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

dis_msg_submit_report

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-gsm_sms.c)expand/collapse
Show more  
 3070  dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
 3071  {
 3072      guint32     saved_offset;
 3073      guint32     length;
 3074      guint8      oct;
 3075      guint8      pi;
 3076      guint8      udl;
 3077      gboolean    seven_bit;
 3078      gboolean    eight_bit;
 3079      gboolean    ucs2;
 3080      gboolean    compressed;
 3081      gboolean    udhi;
 3082   
 3083   
 3084      udl = 0;
 3085      saved_offset = offset;
 3086      length = tvb_length_remaining(tvb, offset);
 3087   
 3088      oct = tvb_get_guint8(tvb, offset);
 3089      udhi = oct & 0x40;
 3090       
 3091      proto_tree_add_item(tree, hf_gsm_sms_tp_udhi, tvb, offset, 1, FALSE);
 3092      proto_tree_add_item(tree, hf_gsm_sms_tp_mti_down, tvb, offset, 1, FALSE);
 3093   
 3094      /*
 3095       * there does not seem to be a way to determine that this
 3096       * deliver report is from an RP-ERROR or RP-ACK other 
 3097       * than to look at the next octet 
 3098       *
 3099       * FCS values are 0x80 and higher
 3100       * PI uses bit 7 as an extension indicator
 3101       *
 3102       * will assume that if bit 7 is set then this octet 
 3103       * is an FCS otherwise PI 
 3104       */
 3105      offset++;
 3106      oct = tvb_get_guint8(tvb, offset);
 3107   
 3108      if (oct & 0x80)
 3109      {
 3110          dis_field_fcs(tvb, tree, offset, oct);
 3111          offset++;
 3112      }
 3113   
 3114      pi = tvb_get_guint8(tvb, offset);
 3115   
 3116      dis_field_pi(tvb, tree, offset, pi);
 3117      offset++;
 3118   
 3119      dis_field_scts(tvb, tree, &offset);
 3120   
 3121      if (pi & 0x01) {
 3122          if (length <= (offset - saved_offset)) {
 3123              proto_tree_add_text(tree,
 3124                  tvb, offset, -1,
 3125                  "Short Data (?)");
 3126              return;
 3127          }
 3128   
 3129          oct = tvb_get_guint8(tvb, offset);
 3130   
 3131          dis_field_pid(tvb, tree, offset, oct);
 3132          offset++;
 3133      }
 3134   
 3135      if (pi & 0x02)
 3136      {
 3137          if (length <= (offset - saved_offset))
 3138          {
 3139              proto_tree_add_text(tree,
 3140                  tvb, offset, -1,
 3141                  "Short Data (?)");
 3142              return;
 3143          }
 3144   
 3145          oct = tvb_get_guint8(tvb, offset);
 3146   
 3147          dis_field_dcs(tvb, tree, offset, oct, &seven_bit, &eight_bit, &ucs2, &compressed);
 3148          offset++;
 3149      }
 3150   
 3151      if (pi & 0x04)
 3152      {
 3153          if (length <= (offset - saved_offset))
 3154          {
 3155              proto_tree_add_text(tree,
 3156                  tvb, offset, -1,
 3157                  "Short Data (?)");
 3158              return;
 3159          }
 3160   
 3161          oct = tvb_get_guint8(tvb, offset);
 3162          udl = oct;
 3163   
 3164          DIS_FIELD_UDL(tree, offset);
 3165          offset++;
 3166      }
 3167   
 3168      if (udl > 0)
 3169      {
 3170          dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl,
 3171              seven_bit, eight_bit, ucs2, compressed);
Show more  




Change Warning 2614.34604 : Uninitialized Variable

Because they are very similar, this warning shares annotations with warnings 2614.34605, 2614.34606, and 2614.34607.

Priority:
State:
Finding:
Owner:
Note: