summaryrefslogtreecommitdiff
path: root/src/simutil.c
diff options
context:
space:
mode:
authorSlava Monich <slava.monich@jolla.com>2021-04-29 19:09:21 +0300
committerDenis Kenzior <denkenz@gmail.com>2021-06-01 10:52:48 -0500
commit8b4e79b443ee20d287bb68ae3a02c1819fd1b2d5 (patch)
tree8749234d9ac12171176e97a44faabd4e4e16f5b1 /src/simutil.c
parent31b6613a938fb0e4b0b9d172df6924722e20c2ce (diff)
downloadofono-8b4e79b443ee20d287bb68ae3a02c1819fd1b2d5.tar.gz
simutil: Fill unused part of AID with FFs
Correct handling of short AIDs will take more than that, but leaving part of the array uninitialized is wrong in any case.
Diffstat (limited to 'src/simutil.c')
-rw-r--r--src/simutil.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/simutil.c b/src/simutil.c
index 9013460e..edd7de88 100644
--- a/src/simutil.c
+++ b/src/simutil.c
@@ -1589,6 +1589,7 @@ GSList *sim_parse_app_template_entries(const unsigned char *buffer, int len)
goto error;
memcpy(app.aid, aid, app.aid_len);
+ memset(app.aid + app.aid_len, 0xff, 16 - app.aid_len);
app.type = (app.aid[5] << 8) | app.aid[6];