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

Skip to content
Commit 36cebe77 authored by George Burgess IV's avatar George Burgess IV
Browse files

Replace strlen with arraysize in array bounds.

clang-FORTIFY doesn't let us evaluate strlen("foo") as a constant
expression that can be used in static array bounds. Instead, we'd need
to either do __builtin_strlen("foo") or arraysize("foo") - 1. Just use
arraysize here, since the extra 1 byte per array isn't likely to be a
terrible thing.

Happy to swap to __builtin_strlen if anyone cares deeply enough.

Bug: 32073964
Test: Now builds with clang FORTIFY.
Change-Id: I4c9b3eb74775901554b939246722bd3a22326d10
parent 24257dda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment