On Wed Jan 24 18:51:33 2024 +0000, Martin Storsjö wrote:
Thanks, that sounds like a reasonable solution. I would expect all the involved structs to be a multiple of 4 already, and padding the strings that way should be enough indeed. And wrapping up the strlens in such a macro sounds like a neat way to fix it. And 4 byte alignment should be fine (I didn’t check what the structs contain, but that should be enough for the ldrd/strd instructions on arm at least).
This mostly worked fine - I could encapsulate most of these into `ntf_strlen` and `ntf_wcslen`, but there was also one case of `sizeof(short) * afmle->afm->NumofMetrics` where I introduced a direct rounding upwards there inline.