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