[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wireshark-bugs
Subject:    [Wireshark-bugs] [Bug 7715] Bluetooth: Add SAP dissector
From:       bugzilla-daemon () wireshark ! org
Date:       2012-09-30 8:37:42
Message-ID: 20120930083742.19EEB182AFF () mail ! wireshark ! org
[Download RAW message or body]

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7715

--- Comment #25 from Pascal Quantin <pascal.quantin@gmail.com> 2012-09-30 01:37:40 PDT ---
(In reply to comment #24)
> Created attachment 9229 [details]
> [PATCH] gsm-sim: Fixes required by Bluetooth SAP
> 
> Changelog: 
> fix issue from comment #20, thanks. Now should be ok, without some malformed
> GSM-SIM packets, is that bug in GSM-SIM or I miss something?

This hunk still does not seem correct to me:
+    if (tvb_len > 2) {
+        proto_tree_add_item(sim_tree, hf_apdu_data, tvb, offset, tvb_len - 2,
ENC_NA);
+        offset = tvb_len - 2;
+    }

has it dose not take into account previous value of offset (that could be
either 0 or 5). In case it is 5, the length given in proto_tree_add_item will
be too big.
Should it be:
+    if ((tvb_len-offset) > 2) {
+        proto_tree_add_item(sim_tree, hf_apdu_data, tvb, offset, tvb_len -
(offset+2), ENC_NA);
+        offset = tvb_len - 2;
+    }
instead?

Harald, I would appreciate if you could give a feedback on the proposed
changes. Without any answer, I will push the changes proposed by Michal (once
the review is OK). Of course if you face any issue afterwards we will fix it.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-request@wireshark.org?subject=unsubscribe
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic