From Gursel Mutlu:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 23 Dec 2008 17:39:19 +0000 (17:39 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 23 Dec 2008 17:39:19 +0000 (17:39 +0000)
WPS defines usage of UUID values for both enrollee and registrar. They are both
16-byte values as defined in RFC 4122 for UUID. Current code on SVN repository
dissectors these values as they are 8 bytes long.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27095 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-wps.c

index ab2591371517fff44c0eb9b41633663df79dcb33..7ef3cd9cd288b21d80b2451bb94ce74fb79ae36b 100644 (file)
@@ -1126,14 +1126,18 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset,
       break;
 
     case WPS_TLV_TYPE_UUID_E:
-      tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_uuid_e, tvb, offset+4, 8, FALSE);
+      tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_uuid_e, tvb, offset+4, tlv_len, FALSE);
       hfindex = hf_eapwps_tlv_uuid_e;
+      if (tlv_len > 16 && pinfo) 
+       expert_add_info_format(pinfo, tmp_item, PI_MALFORMED, PI_ERROR, fmt_warn_too_long, tlv_len);
 
       break;
 
     case WPS_TLV_TYPE_UUID_R:
-      tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_uuid_r, tvb, offset+4, 8, FALSE);
+      tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_uuid_r, tvb, offset+4, tlv_len, FALSE);
       hfindex = hf_eapwps_tlv_uuid_r;
+      if (tlv_len > 16 && pinfo) 
+       expert_add_info_format(pinfo, tmp_item, PI_MALFORMED, PI_ERROR, fmt_warn_too_long, tlv_len);
 
       break;