Wireshark-bugs: [Wireshark-bugs] [Bug 5534] WPS: Implements Primary Device Type decryption
Date: Mon, 7 Feb 2011 01:58:12 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5534

--- Comment #5 from Masashi Honma <masashi.honma@xxxxxxxxx> 2011-02-07 01:58:08 PST ---
(In reply to comment #4)
> (From update of attachment 5719 [details])
> hf_eapwps_tlv_primary_device_type_subcategory[tvb_get_ntohs(tvb, offset+4) - 1]
> 
> You cannot be sure that the index won't overrun the array boundaries, since you
> cannot be sure you receive valid packets. Therefore this indexing has to be
> verified first.


Thanks for your review.

I have already checked the index by this code.

        tvb_get_ntohs(tvb, offset+4) > 0 &&
        tvb_get_ntohs(tvb, offset+4) <= WPS_DEVICE_TYPE_CATEGORY_MAX) {

Is this not enough ?

Regards,
Masahi Honma.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.