Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e377aae9 authored by Casper Bonde's avatar Casper Bonde Committed by Andre Eisenbach
Browse files

SAP: Fix logic to skip padding bytes for requests received



As per SAP spec, padding bytes can be 0-3 bytes, but the current code
has incorrect logic, that would lead to calculation of padding bytes
as 4 in case the APDU length was multiple of 4, which would lead to
incorrect parsing logic in SAP Server and can lead to issues of no
response for APDU request from SAP Server as it keeps waiting for
reading more bytes from rfcomm which are not present.

Also check added in code not to send msg to RIL if socket is null to
prevent crash in BT Sap module.

Bug: 23024598
Signed-off-by: default avatarCasper Bonde <c.bonde@samsung.com>
Change-Id: I24e4a6b850709c9c32b7e0992626a0219dacef03
parent 08fba96f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment