GSM SIM: for a FETCH command, a Le of 0 means 256 bytes

Change-Id: Ia8969747c215a5ba7e9242b6266114b0e9e00859
Reviewed-on: https://code.wireshark.org/review/6712
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
Pascal Quantin 2015-01-21 10:06:33 +01:00
parent 17a1748ca9
commit 163071e388
1 changed files with 2 additions and 3 deletions

View File

@ -1345,7 +1345,7 @@ dissect_gsm_apdu(guint8 ins, guint8 p1, guint8 p2, guint8 p3, tvbuff_t *tvb,
case 0x12: /* FETCH */
proto_tree_add_item(tree, hf_le, tvb, offset+P3_OFFS, 1, ENC_BIG_ENDIAN);
if (isSIMtrace) {
subtvb = tvb_new_subset_length(tvb, offset+DATA_OFFS, p3);
subtvb = tvb_new_subset_length(tvb, offset+DATA_OFFS, (p3 == 0) ? 256 : p3);
dissect_bertlv(subtvb, pinfo, tree);
}
break;
@ -1472,8 +1472,7 @@ dissect_cmd_apdu_tvb(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree
val_to_str(cla>>4, apdu_cla_coding_vals, "%01x"));
}
/* if (cla == 0xA0) */
rc = dissect_gsm_apdu(ins, p1, p2, p3, tvb, offset, pinfo, sim_tree, isSIMtrace);
rc = dissect_gsm_apdu(ins, p1, p2, p3, tvb, offset, pinfo, sim_tree, isSIMtrace);
if (rc == -1 && sim_tree) {
/* default dissector */