loadarchive: guard against locale-archive corruption (Bug #25115)
_nl_load_locale_from_archive() checks for a zero size, but
divides by both (size) and (size-2). Extend the check to
guard against a size of two or less.
Tested by manually corrupting locale-archive and running a program
that calls setlocale() with LOCPATH unset (size is typically very
large).
Reviewed-by:
Carlos O'Donell <carlos@redhat.com>
Loading
Please register or sign in to comment