diff options
author | Slava Monich <slava.monich@jolla.com> | 2021-04-29 19:09:21 +0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2021-06-01 10:52:48 -0500 |
commit | 8b4e79b443ee20d287bb68ae3a02c1819fd1b2d5 (patch) | |
tree | 8749234d9ac12171176e97a44faabd4e4e16f5b1 /src | |
parent | 31b6613a938fb0e4b0b9d172df6924722e20c2ce (diff) | |
download | ofono-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')
-rw-r--r-- | src/simutil.c | 1 |
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]; |