commit | 5593d3a8ad8514d85e3c7398a3bab7eff53152dd | [log] [tgz] |
---|---|---|
author | Ivan Lozano <ivanlozano@google.com> | Thu Dec 07 13:08:52 2017 -0800 |
committer | Ivan Lozano <ivanlozano@google.com> | Thu Dec 07 13:08:52 2017 -0800 |
tree | 2398dbffa66fbbed679681894a47807a613d86fe | |
parent | eda72c27cab52c41016d8ce138438a2d59973231 [diff] |
Fix integer sanitizer in clearkey. Calculating index sometimes causes an unsigned integer overflow. This throws a runtime error on integer sanitized builds. runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'unsigned int' Since this gets implicitly converted to ssize_t anyhow, make the conversion explicit before decrementing to avoid the overflow. Bug: 30969751 Test: Compiles. Change-Id: Ibd39c1ba0dc64673743672ffc70c22c09f8e828a