Files
nethack/util
PatR 7c1512fa99 avoid strnlen()
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().
2024-01-22 12:59:51 -08:00
..
2023-12-20 18:48:17 -05:00
2024-01-22 12:59:51 -08:00
2023-11-22 16:01:58 -05:00
2023-11-22 16:01:58 -05:00
2022-09-17 15:57:52 -04:00
2023-06-23 12:10:38 -07:00