4 ms·
The while (*src++); on line 45 of lib/libc/string/strlcpy.c is an inline implementation of strlen here. It's done solely for the benefit of the return value (sr
by qhwudbebd 4y ago
The while (*src++); on line 45 of lib/libc/string/strlcpy.c is an inline implementation of strlen here. It's done solely for the benefit of the return value (src - osrc - 1) but means that it traverses the entire length of src until the first NUL - even if that's gigabytes or wanders out of mapped memory.