Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-gsm_sms.c:2993

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

dis_msg_deliver_report

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-gsm_sms.c)expand/collapse
Show more  
 2882  dis_msg_deliver_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
 2883  {
 2884      guint32     saved_offset;
 2885      guint32     length;
 2886      guint8      oct;
 2887      guint8      pi;
 2888      guint8      udl;
 2889      gboolean    seven_bit;
 2890      gboolean    eight_bit;
 2891      gboolean    ucs2;
 2892      gboolean    compressed;
 2893      gboolean    udhi;
 2894   
 2895   
 2896      udl = 0;
 2897      saved_offset = offset;
 2898[+]     length = tvb_length_remaining(tvb, offset);
 2899   
 2900      oct = tvb_get_guint8(tvb, offset);
 2901      udhi = oct & 0x40;
 2902   
 2903      proto_tree_add_item(tree, hf_gsm_sms_tp_udhi, tvb, offset, 1, FALSE);
 2904      proto_tree_add_item(tree, hf_gsm_sms_tp_mms, tvb, offset, 1, FALSE);
 2905      proto_tree_add_item(tree, hf_gsm_sms_tp_mti_up, tvb, offset, 1, FALSE);
 2906   
 2907      if (length < 2)
 2908      {
 2909          proto_tree_add_text(tree,
 2910              tvb, offset, length,
 2911              "Short Data (?)");
 2912          return;
 2913      }
 2914   
 2915      /*
 2916       * there does not seem to be a way to determine that this
 2917       * deliver report is from an RP-ERROR or RP-ACK other 
 2918       * than to look at the next octet 
 2919       *
 2920       * FCS values are 0x80 and higher
 2921       * PI uses bit 7 as an extension indicator
 2922       *
 2923       * will assume that if bit 7 is set then this octet 
 2924       * is an FCS otherwise PI 
 2925       */
 2926      offset++;
 2927      oct = tvb_get_guint8(tvb, offset);
 2928   
 2929      if (oct & 0x80)
 2930      {
 2931          dis_field_fcs(tvb, tree, offset, oct);
 2932          offset++;
 2933      }
 2934   
 2935      pi = tvb_get_guint8(tvb, offset);
 2936   
 2937      dis_field_pi(tvb, tree, offset, pi);
 2938   
 2939      if (pi & 0x01)
 2940      {
 2941          if (length <= (offset - saved_offset))
 2942          {
 2943              proto_tree_add_text(tree,
 2944                  tvb, offset, -1,
 2945                  "Short Data (?)");
 2946              return;
 2947          }
 2948   
 2949          offset++;
 2950          oct = tvb_get_guint8(tvb, offset);
 2951   
 2952          dis_field_pid(tvb, tree, offset, oct);
 2953      }
 2954   
 2955      if (pi & 0x02)
 2956      {
 2957          if (length <= (offset - saved_offset))
 2958          {
 2959              proto_tree_add_text(tree,
 2960                  tvb, offset, -1,
 2961                  "Short Data (?)");
 2962              return;
 2963          }
 2964   
 2965          offset++;
 2966          oct = tvb_get_guint8(tvb, offset);
 2967   
 2968          dis_field_dcs(tvb, tree, offset, oct, &seven_bit, &eight_bit, &ucs2, &compressed);
 2969      }
 2970   
 2971      if (pi & 0x04)
 2972      {
 2973          if (length <= (offset - saved_offset))
 2974          {
 2975              proto_tree_add_text(tree,
 2976                  tvb, offset, -1,
 2977                  "Short Data (?)");
 2978              return;
 2979          }
 2980   
 2981          offset++;
 2982[+]         oct = tvb_get_guint8(tvb, offset);
 2983          udl = oct;
 2984   
 2985          DIS_FIELD_UDL(tree, offset);
 2986      }
 2987   
 2988      if (udl > 0)
 2989      {
 2990          offset++;
 2991   
 2992          dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl,
 2993              seven_bit, eight_bit, ucs2, compressed);
Show more  




Change Warning 2613.34600 : Uninitialized Variable

Because they are very similar, this warning shares annotations with warnings 2613.34601, 2613.34602, and 2613.34603.

Priority:
State:
Finding:
Owner:
Note: