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

Commit 7b461b52 authored by Jeff Tinker's avatar Jeff Tinker Committed by The Android Automerger
Browse files

Fix security vulnerability in ICrypto DO NOT MERGE

b/25800375

Change-Id: I03c9395f7c7de4ac5813a1207452aac57aa39484
parent 0681b532
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -321,7 +321,9 @@ status_t BnCrypto::onTransact(

            if (overflow || sumSubsampleSizes != totalSize) {
                result = -EINVAL;
            } else if (offset + totalSize > sharedBuffer->size()) {
            } else if (totalSize > sharedBuffer->size()) {
                result = -EINVAL;
            } else if ((size_t)offset > sharedBuffer->size() - totalSize) {
                result = -EINVAL;
            } else {
                result = decrypt(