Fix invalid padding bits for 7-bit ASCII encoding
Calculate correct padding bits for 7-bit ASCII encoding so that
unnecessary byte 0x00 is not appended in the User Data subparameter.
See the below issue case.
After encodeUserDataPayload(UserData;5 ASCII chars) in encodeUserData(),
UserData.numFields = 5 and UserData.payload = 5 septets and 5 bits
padding. Nevertheless if UserData.paddingBits = 0 still, paddingBits in
encodeUserData() will be 3. As a result, unnecessary one byte(5 + 3 bits)
padding is appended.
Test: Manual
Change-Id: I1cd19d5c491d8eed3b41bf5cb101fc77cb6090ab
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Loading
Please register or sign in to comment