Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at to_str.c:858

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

dissect_netb_status_resp

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-netbios.c)expand/collapse
Show more  
 797  dissect_netb_status_resp( tvbuff_t *tvb, int offset, proto_tree *tree)
 798   
 799  {/* Handle the STATUS RESPONSE command */
 800          guint8 status_response = tvb_get_guint8( tvb, offset + NB_DATA1);
 801          proto_item *td2;
 802          proto_tree *data2_tree;
 803          guint16 data2;
 804   
 805          nb_call_name_type( tvb, offset, tree);
 806          if (status_response == 0) {
 807                  proto_tree_add_text(tree, tvb, offset + NB_DATA1, 1,
 808                      "Status response: NetBIOS 1.x or 2.0");
 809          } else {
 810                  proto_tree_add_text(tree, tvb, offset + NB_DATA1, 1,
 811                      "Status response: NetBIOS 2.1, %u names sent so far",
 812                      status_response);
 813          }
 814          data2 = tvb_get_letohs( tvb, offset + NB_DATA2);
 815   
 816          td2 = proto_tree_add_text(tree, tvb, offset + NB_DATA2, 2, "Status: 0x%04x",
 817              data2);
 818          data2_tree = proto_item_add_subtree(td2, ett_netb_status);
 819          if (data2 & 0x8000) {
 820                  proto_tree_add_text(data2_tree, tvb, offset, 2, "%s",
 821                      decode_boolean_bitfield(data2, 0x8000, 8*2,
 822[+]                         "Data length exceeds maximum frame size", NULL));
expand/collapse

decode_boolean_bitfield

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/to_str.c)expand/collapse
Show more  
 846  const char *
 847  decode_boolean_bitfield(guint32 val, guint32 mask, int width,
 848      const char *truedesc, const char *falsedesc)
 849  {
 850    char *buf;
 851    char *p;
 852   
 853    buf=ep_alloc(1025); /* is this a bit overkill? */
 854    p = decode_bitfield_value(buf, val, mask, width);
 855    if (val & mask)
 856      strcpy(p, truedesc);
 857    else 
 858      strcpy(p, falsedesc);
Show more  
Show more  




Change Warning 2844.33425 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: