diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-05-29 12:03:44 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-05-29 12:03:44 +0000 |
commit | 6e607d847cc9ad50610238da03a92c4b01eb577a (patch) | |
tree | 13f5d24bfb261b5f2c2d84bc50be6b330e2d845f /locale | |
parent | e7a95dc622058b3e8cb90263c51e96ae04abfe71 (diff) | |
download | glibc-6e607d847cc9ad50610238da03a92c4b01eb577a.zip glibc-6e607d847cc9ad50610238da03a92c4b01eb577a.tar.gz glibc-6e607d847cc9ad50610238da03a92c4b01eb577a.tar.bz2 |
Update.
* locale/loadlocale.c (_nl_load_locale): Don't allow too small
files crash the program.
* string/Makefile: Don't run test on tst-svc.out if cross-compiling.
Diffstat (limited to 'locale')
-rw-r--r-- | locale/loadlocale.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c index 3ac161e..d856063 100644 --- a/locale/loadlocale.c +++ b/locale/loadlocale.c @@ -1,5 +1,5 @@ /* Functions to read locale data files. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996. @@ -160,6 +160,9 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) else goto puntfd; } + else if (st.st_size < sizeof (*filedata)) + /* This cannot be a locale data file since it's too small. */ + goto puntfd; if (filedata->magic == LIMAGIC (category)) /* Good data file in our byte order. */ |