diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-04-07 07:02:20 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-04-07 07:02:20 +0000 |
commit | 616d91335a8be5fda715a34dac48bb067d77b523 (patch) | |
tree | c1fff0833a3adb6b8ea83453aabadfb7acbedb69 /locale/programs/ld-address.c | |
parent | 0292b0dd6c85436fb10df5a77bde53ad4c298a6b (diff) | |
download | glibc-616d91335a8be5fda715a34dac48bb067d77b523.tar.gz glibc-616d91335a8be5fda715a34dac48bb067d77b523.tar.xz glibc-616d91335a8be5fda715a34dac48bb067d77b523.zip |
* elf/ldconfig.c (main): Use rawmemchr instead of strchr.
* nis/nis_call.c (rec_dirsearch): Likewise. * nis/nis_local_names.c (nis_local_host): Likewise. (nis_local_directory): Likewise. * intl/explodename.c (_nl_explode_name): Likewise. * sysdeps/generic/unwind-dw2.c (execute_cfa_program): Don't handle DW_CFA_GNU_windiw_save if it obviously cannot work [Coverity CID 102]. * locale/programs/ld-address.c (address_finish): Fix conditions for error messages [Coverity CID 104].
Diffstat (limited to 'locale/programs/ld-address.c')
-rw-r--r-- | locale/programs/ld-address.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/locale/programs/ld-address.c b/locale/programs/ld-address.c index 4d649b0456..83cd9fa17b 100644 --- a/locale/programs/ld-address.c +++ b/locale/programs/ld-address.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2002, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -222,14 +222,18 @@ No definition for %s category found"), "LC_ADDRESS")); if (address->lang_ab == NULL) { - if (iso639[cnt].ab[0] != '\0' && verbose && ! nothing) + if ((cnt == sizeof (iso639) / sizeof (iso639[0]) + || iso639[cnt].ab[0] != '\0') + && verbose && ! nothing) WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' not defined"), "LC_ADDRESS", "lang_ab")); address->lang_ab = ""; } else if (address->lang_ab[0] == '\0') { - if (iso639[cnt].ab[0] != '\0' && verbose) + if ((cnt == sizeof (iso639) / sizeof (iso639[0]) + || iso639[cnt].ab[0] != '\0') + && verbose) WITH_CUR_LOCALE (error (0, 0, _("%s: field `%s' must not be empty"), "LC_ADDRESS", "lang_ab")); } |