commit | eaf83c4418b00909263da9dc9b273eafe2be7fd1 | [log] [tgz] |
---|---|---|
author | Mythri Alle <mythria@google.com> | Wed Jan 25 13:38:32 2023 +0000 |
committer | Mythri Alle <mythria@google.com> | Wed Jan 25 13:42:04 2023 +0000 |
tree | 73eb518861d418afcea38b8da874b549da1c8034 | |
parent | 76cdbd342102dcada250884df5f8c93a45a46608 [diff] |
Exit early if ensureCapacity is unable to allocate the required capacity ensureCapacity used to return -1 when the allocation failed for the requested capacity. The callers weren't checking for the return value and continued using the buffer assuming the request was successful. Since there is no way to recover from this error just exit early in ensureCapacity. Bug: 261385338 Change-Id: I75f4503ae42e6f03f8cfebb1fd3c8ee6c873c5b6