Fix RS HIDL client to correctly treat data passing by bytes.
Our current stack:
API->API_TO_HAL_translator-> HAL
->HAL_TO_Implementation_translator->Implementation
For most APIs:
- API passes objectCount.
- HAL expects objectCount.
- Implementation expects objectCount.
For APIs like ScriptGroupCreate:
- API passes byteCount. And unfortunately, these APIs are part of
NDK, we could not make them also passing objectCount like others.
- HAL expects objectCount.
- Implementation expects byteCount.
So that both API_TO_HAL_translator and
HAL_TO_Implementation_translator should correctly convert input
objectCount/byteCount to byteCount/objectCount.
This CL only fixes the API_TO_HAL_translator part.
API_TO_HAL_translator was mistakenly using byteCount as
objectCount, causing potential out-of-bound access.
Bug: 36404879
Test: mm
Change-Id: Ic3d4e6f4cfaa81239e9f732e739d5a79e08b1b64
1 file changed