https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7715
--- Comment #25 from Pascal Quantin <pascal.quantin@xxxxxxxxx> 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.