From 17b6c6c31461c4e2034573f1d3af2ca39edfaac0 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 13 Nov 2019 15:25:12 -0600 Subject: [PATCH] simutil: Fix EF structure bit processing The intent here was to find the contents of the 3 low order bits according to Table 11-5 in ETSI 102.221. However, the mask ended up only grabbing the contents of the 2 low order bits. --- src/simutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simutil.c b/src/simutil.c index 22dfaeb6..c9172b23 100644 --- a/src/simutil.c +++ b/src/simutil.c @@ -1410,7 +1410,7 @@ gboolean sim_parse_3g_get_response(const unsigned char *data, int len, if (tlv[1] != 0x21) return FALSE; - switch (tlv[0] & 0x3) { + switch (tlv[0] & 0x7) { case 1: /* Transparent */ str = 0x00; break;