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

Skip to content
Commit 0fe78078 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

MockDrmCryptoPlugin: Don't truncate log output

A function argument which is an array with a fixed size is not
actually a fixed size array, but rather just a pointer.  Thus,
when we were using sizeof() for 'key' and 'iv', we were mostly
likely only logging the first 4 or 8 bytes of the array, and
not all 16.

We change this code so we're at least passing the correct size
to the arrayToString method, and thus logging all the bytes.

This API is still fragile, as there is nothing which assures
callers to decrypt are passing in arrays which are exactly 16
bytes.  However, this API is equivalent to before, so we aren't
introducing any compatibility issues.

The compiler gave a warning about this.

Test: Compiled and confirmed there's no longer this compiler warning.
Change-Id: Ie3a32eef0882ea95bccc3e22ffcab7336779bd4c
parent c11caab9
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