Don't send more than 2K to addRngEntropy

Bug: 63745893
Test: VtsHalKeymasterV3_0TargetTest
Change-Id: I136920d3b62e026b22fbe06594bc40ccddc57dc3
(cherry picked from commit 3e1267edf0)
This commit is contained in:
Shawn Willden
2017-08-11 14:33:44 -06:00
parent 4f3c28ad7a
commit 02ffb2be41

View File

@@ -3864,7 +3864,7 @@ TEST_F(AddEntropyTest, AddEmptyEntropy) {
* Verifies that the addRngEntropy method doesn't blow up when given a largish amount of data.
*/
TEST_F(AddEntropyTest, AddLargeEntropy) {
EXPECT_EQ(ErrorCode::OK, keymaster().addRngEntropy(HidlBuf(string(16 * 1024, 'a'))));
EXPECT_EQ(ErrorCode::OK, keymaster().addRngEntropy(HidlBuf(string(2 * 1024, 'a'))));
}
typedef KeymasterHidlTest AttestationTest;