personalization: SUCI: ff-pad remaining file size

Change-Id: I9465eac9269e3f76dddd467109f547489a0feb93
This commit is contained in:
Neels Hofmeyr
2026-05-13 15:59:02 +02:00
parent 00af942dbc
commit 7d18f16e26
+9 -1
View File
@@ -1344,7 +1344,15 @@ class SuciCalcInfoParameter(ConfigurableParameter):
if not f_sucici:
continue
ef_sucici = EF_SUCI_Calc_Info()
f_sucici.body = ef_sucici.encode_bin(val)
body = ef_sucici.encode_bin(val)
# 0xff pad up to the existing file size, so that the underlying template doesn't come through
is_size = f_sucici.file_size
pad_n = is_size - len(body)
if pad_n > 0:
body = body + b'\xff' * pad_n
f_sucici.body = body
pe.file2pe(f_sucici)
@classmethod