SAP: Fix logic to skip padding bytes for requests received from Client
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. Change-Id: I24e4a6b850709c9c32b7e0992626a0219dacef03 CRs-Fixed: 881390
Loading
Please register or sign in to comment