Android 9.0.0 release 50
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCXcBYaQAKCRDorT+BmrEO
eFyiAJ0UfTBY9LoM13VuHTLjXWLz/R1VCgCcChMN0+/e+HCVk2bFwbincKkd6YA=
=buhK
-----END PGP SIGNATURE-----
[DO NOT MERGE] Fix signedness mismatch and integer underflow

persist_get_max_entries() is supposed to return an unsigned integer as the
maximum number of entries but it also wrongly returns "-1" as an error
condition. Also fix an issue where an unsigned subtraction in this routine
could lead to integer underflow.

Bug: 112731440
Test: manual
Change-Id: I9672e39bef2c12156dda7806a08c52044962c178
(cherry picked from commit 19ef1ae99a0138197e43658e84d860d17912a4a0)
1 file changed