Replace the single strnlen() use with strlen() so as not to require something from posix.1 (2008) when we supposedly only require c99. If someone manages to produce a string that's longer than will fit within size_t, strlen()'s length count will wrap and Strlen_() might not notice. Since size_t has to be at least 32 bits, that doesn't seem like something to worry about. If checking for size_t overflow is considered essential, we should just switch to counting the length via an in-line loop that imposes a similar limit to strnlen().
16 KiB
16 KiB