summary refs log tree commit diff
path: root/nss/valid_field.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2019-10-18 17:15:52 -0400
committerDJ Delorie <dj@redhat.com>2019-10-18 20:40:54 -0400
commitef21bd2d8c6805c0c186a01f7c5039189f51b8c4 (patch)
treee5b1cd6c840e63bccd13bfbe05e7219aefc31f7a /nss/valid_field.c
parenta807613bcff42dfacfe0961fa60e95c988ab6e92 (diff)
downloadglibc-ef21bd2d8c6805c0c186a01f7c5039189f51b8c4.tar.gz
glibc-ef21bd2d8c6805c0c186a01f7c5039189f51b8c4.tar.xz
glibc-ef21bd2d8c6805c0c186a01f7c5039189f51b8c4.zip
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>
Diffstat (limited to 'nss/valid_field.c')
0 files changed, 0 insertions, 0 deletions