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
Loading
Please register or sign in to comment