Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2014-07-29 | harden mo file processing for locale/translations | Rich Felker | 1 | -2/+6 | |
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. | |||||
2014-07-26 | implement mo file string lookup for translations | Rich Felker | 1 | -0/+38 | |
the core is based on a binary search; hash table is not used. both native and reverse-endian mo files are supported. all offsets read from the mapped mo file are checked against the mapping size to prevent the possibility of reads outside the mapping. this commit has no observable effects since there are not yet any callers to the message translation code. |