aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarien Spencer <cusneud@mail.com>2018-07-25 20:48:46 +0300
committerPascal Quantin <pascal.quantin@gmail.com>2018-07-25 20:44:47 +0000
commit762f12d625a3e4fe43a7d19d26b9e6de97dd90e2 (patch)
treed106835e01c8cd1fdea08c79f1e59c42a45b253f
parent8607026a7dc38e108d05711845fd752463f036e4 (diff)
GSM SIM: Fix special case for "Wrong length" sw
While TS 51.011 defines '67 XX' as "Incorrect param P3", TS 102.221 specifies a special case '67 00' which wasn't taken into account in the dissector Change-Id: I2f17bd0035b3a9f4cdd625523eef06be416d451e Reviewed-on: https://code.wireshark.org/review/28849 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-gsm_sim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_sim.c b/epan/dissectors/packet-gsm_sim.c
index 5fe72b470e..8e90931624 100644
--- a/epan/dissectors/packet-gsm_sim.c
+++ b/epan/dissectors/packet-gsm_sim.c
@@ -1113,7 +1113,10 @@ static const gchar *get_sw_string(guint16 sw)
case 0x61:
return wmem_strdup_printf(wmem_packet_scope(), "Response ready, Response length is %u", sw2);
case 0x67:
- return "Incorrect parameter P3";
+ if (sw2 == 0x00)
+ return "Wrong length"; /* TS 102.221 / Section 10.2.1.5 */
+ else
+ return "Incorrect parameter P3"; /* TS 51.011 / Section 9.4.6 */
case 0x6c:
return wmem_strdup_printf(wmem_packet_scope(), "Terminal should repeat command, Length for repeated command is %u", sw2);
case 0x6d: