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

Skip to content
Commit f1151c3e authored by Ivan Lozano's avatar Ivan Lozano
Browse files

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
Merged-In: Ibd39c1ba0dc64673743672ffc70c22c09f8e828a
parent 240201e2
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