diff options
author | Bruno Haible <bruno@clisp.org> | 2007-10-13 15:45:39 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:15:16 +0200 |
commit | a446f39e20893bfc7857fe2d004909af1ee7252d (patch) | |
tree | abeca9ba66e5d9b35db4407ae8ffc7b194080a3b /gettext-runtime | |
parent | e381b2658d27715bffc803a37d8d4b8409058747 (diff) | |
download | external_gettext-a446f39e20893bfc7857fe2d004909af1ee7252d.zip external_gettext-a446f39e20893bfc7857fe2d004909af1ee7252d.tar.gz external_gettext-a446f39e20893bfc7857fe2d004909af1ee7252d.tar.bz2 |
From glibc: 2007-07-11 Jakub Jelinek <jakub@redhat.com>
Diffstat (limited to 'gettext-runtime')
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 7 | ||||
-rw-r--r-- | gettext-runtime/intl/explodename.c | 6 | ||||
-rw-r--r-- | gettext-runtime/intl/finddomain.c | 5 |
3 files changed, 15 insertions, 3 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index dc182df..8f668ba 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,10 @@ +2007-07-11 Jakub Jelinek <jakub@redhat.com> + + * finddomain.c (_nl_find_domain): If _nl_explode_name returned -1, + return NULL. + * explodename.c (_nl_explode_name): Return -1 if _nl_normalize_codeset + failed. + 2007-06-10 Bruno Haible <bruno@clisp.org> * printf-parse.c: Don't include config.h and the specification diff --git a/gettext-runtime/intl/explodename.c b/gettext-runtime/intl/explodename.c index 8d3e146..eb5dd75 100644 --- a/gettext-runtime/intl/explodename.c +++ b/gettext-runtime/intl/explodename.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995-1998, 2000-2001, 2003, 2005, 2007 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. This program is free software; you can redistribute it and/or modify it @@ -105,7 +105,9 @@ _nl_explode_name (char *name, { *normalized_codeset = _nl_normalize_codeset (*codeset, cp - *codeset); - if (strcmp (*codeset, *normalized_codeset) == 0) + if (*normalized_codeset == NULL) + return -1; + else if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else mask |= XPG_NORM_CODESET; diff --git a/gettext-runtime/intl/finddomain.c b/gettext-runtime/intl/finddomain.c index a25bebc..97d098b 100644 --- a/gettext-runtime/intl/finddomain.c +++ b/gettext-runtime/intl/finddomain.c @@ -1,5 +1,5 @@ /* Handle list of needed message catalogs - Copyright (C) 1995-1999, 2000-2001, 2003-2006 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2001, 2003-2007 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.org>, 1995. This program is free software; you can redistribute it and/or modify it @@ -144,6 +144,9 @@ _nl_find_domain (const char *dirname, char *locale, look for the language. Termination symbols are `_', '.', and `@'. */ mask = _nl_explode_name (locale, &language, &modifier, &territory, &codeset, &normalized_codeset); + if (mask == -1) + /* This means we are out of core. */ + return NULL; /* We need to protect modifying the _NL_LOADED_DOMAINS data. */ gl_rwlock_wrlock (lock); |