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

Skip to content
Commit 46cba442 authored by Kevin Rocard's avatar Kevin Rocard Committed by Mikhail Naganov
Browse files

Legacy wrapper: Use arbitrary limit on buffer size



The legacy HAL wrapper prepareForWrite and prepareForRead used
to return INVALID_ARGUMENTS if the computed buffer size just
under SIZE_MAX.

This meant that the limitation depended on the architecture (32 vs 64
bit size_t). This caused VTS test failure on 64 bits.

Instead of dynamically calculating an arbitrary max size,
choose a fixed one. This max buffer size has been chosen at 1GiB.
It should be enough for the foreseeable future and not too close
from the 4GiB max on 32 bit.

Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
Bug: 67030516
Change-Id: I4cc3efda9bb66e6dae8b4e6785f52d9e51440aee
Signed-off-by: default avatarKevin Rocard <krocard@google.com>
parent 3021f1fa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment