Skip to contentSkip to conversation

simutil: fix bug when parsing AID type

PATCH Applied James Prestwood 2 participants 2 messages May 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 simutil: fix bug when parsing AID type

---
 src/simutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/simutil.c +1 -1
index 7a23c977..9287df17 100644
@@ -1576,7 +1576,7 @@ GSList *sim_parse_app_template_entries(const unsigned char *buffer, int len)
 
 		memcpy(app.aid, aid, app.aid_len);
 
-		app.type = (app.aid[5] << 8) & app.aid[6];
+		app.type = (app.aid[5] << 8) | app.aid[6];
 
 		/* Find the label (optional) */
 		label = ber_tlv_find_by_tag(dataobj, 0x50, dataobj_len,
Signature · 1 line
2.17.0
#1 lore raw

Hi James,

Quoted 4 lines · James Prestwood
---
  src/simutil.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis