Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at packet-dcerpc-spoolss.c:6719

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

dissect_spoolss_printer_enum_values

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-dcerpc-spoolss.c)expand/collapse
Show more  
 6608  dissect_spoolss_printer_enum_values(tvbuff_t *tvb, int offset,  
 6609                                      packet_info *pinfo, proto_tree *tree,
 6610                                      guint8 *drep)
 6611  {
 6612          guint32 start_offset = offset;
 6613          guint32 name_offset, name_len, val_offset, val_len, val_type;
 6614          char *name;
 6615          proto_item *item;
 6616          proto_tree *subtree;
 6617   
 6618          /* Get offset of value name */
 6619   
 6620          offset = dissect_ndr_uint32(
 6621                  tvb, offset, pinfo, NULL, drep,
 6622                  hf_enumprinterdataex_name_offset, &name_offset);
 6623   
 6624          offset = dissect_ndr_uint32(
 6625                  tvb, offset, pinfo, NULL, drep,
 6626                  hf_enumprinterdataex_name_len, &name_len);
 6627   
 6628          dissect_spoolss_uint16uni(
 6629                  tvb, start_offset + name_offset, pinfo, NULL, drep,  
 6630                  &name, "Name");
 6631   
 6632          item = proto_tree_add_text(tree, tvb, offset, 0, "Name: ");
 6633   
 6634          subtree = proto_item_add_subtree(item, ett_printer_enumdataex_value);
 6635   
 6636          proto_item_append_text(item, "%s", name);
 6637                                 
 6638          proto_tree_add_text(
 6639                  subtree, tvb, offset - 8, 4, "Name offset: %d", name_offset);
 6640   
 6641          proto_tree_add_text(
 6642                  subtree, tvb, offset - 4, 4, "Name len: %d", name_len);
 6643   
 6644          proto_tree_add_text(
 6645                  subtree, tvb, start_offset + name_offset, ((int)strlen(name) + 1) * 2,
 6646                  "Name: %s", name);
 6647   
 6648          offset = dissect_ndr_uint32(
 6649                  tvb, offset, pinfo, subtree, drep, hf_printerdata_type,  
 6650                  &val_type);
 6651   
 6652          offset = dissect_ndr_uint32(
 6653                  tvb, offset, pinfo, subtree, drep,
 6654[+]                 hf_enumprinterdataex_val_offset, &val_offset);
 6655   
 6656          offset = dissect_ndr_uint32(
 6657                  tvb, offset, pinfo, subtree, drep,
 6658                  hf_enumprinterdataex_val_len, &val_len);
 6659   
 6660          if (val_len == 0) {
 6661                  proto_tree_add_text(subtree, tvb, start_offset + val_offset, 4,  
 6662                                      "Value: (null)");
 6663                  goto done;
 6664          }
 6665   
 6666          switch(val_type) {
 6667          case DCERPC_REG_DWORD: {
 6668                  guint32 value;
 6669                  guint16 low, high;
 6670                  int offset2 = start_offset + val_offset;
 6671   
 6672                  /* Needs to be broken into two 16-byte ints because it may
 6673                     not be aligned. */
 6674   
 6675                  offset2 = dissect_ndr_uint16(
 6676                          tvb, offset2, pinfo, subtree, drep,
 6677
6703
Show [ Lines 6677 to 6703 omitted. ]
 6704          }
 6705          case DCERPC_REG_BINARY:
 6706   
 6707                  /* FIXME: nicer way to display this */
 6708   
 6709                  proto_tree_add_text(
 6710                          subtree, tvb, start_offset + val_offset, val_len,  
 6711                          "Value: <binary data>");
 6712                  break;
 6713   
 6714          case DCERPC_REG_MULTI_SZ:
 6715   
 6716                  /* FIXME: implement REG_MULTI_SZ support */
 6717   
 6718                  proto_tree_add_text(
 6719                          subtree, tvb, start_offset + val_offset, val_len,  
 6720                          "Value: <REG_MULTI_SZ not implemented>");
Show more  




Change Warning 2164.33921 : Uninitialized Variable

Because they are very similar, this warning shares annotations with warnings 2164.33922 and 2164.33923.

Priority:
State:
Finding:
Owner:
Note: