• R
    harden mo file processing for locale/translations · 6e892106
    Rich Felker 提交于
    rather than just checking that the start of the string lies within the
    mapping, also check that the nominal length remains within the
    mapping, and that the null terminator is present at the nominal
    length. this ensures that the caller, using the result as a C string,
    will not read past the end of the mapping.
    
    the nominal length is never exposed to the caller, but it's useful
    internally to find where the null terminator should be without having
    to restort to linear search via strnlen/memchr.
    6e892106
__mo_lookup.c 1002 字节