* 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].
2006-04-06 Ulrich Drepper <drepper@redhat.com>
+ * 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].
+
* libio/fmemopen.c (fmemopen): Free stream memory in case of
invalid length [Coverity CID 106].
if (opt_chroot)
{
/* Normalize the path a bit, we might need it for printing later. */
- char *endp = strchr (opt_chroot, '\0');
+ char *endp = rawmemchr (opt_chroot, '\0');
while (endp > opt_chroot && endp[-1] == '/')
--endp;
*endp = '\0';
-/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
if (*language == cp)
/* This does not make sense: language has to be specified. Use
this entry as it is without exploding. Perhaps it is an alias. */
- cp = strchr (*language, '\0');
+ cp = __rawmemchr (*language, '\0');
else if (cp[0] != '@')
{
if (cp[0] == '_')
-/* 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.
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"));
}
-/* Copyright (C) 1997, 1998, 2001, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2001,2004,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
return dir;
}
- cp = strchr (leaf, '\0');
+ cp = rawmemchr (leaf, '\0');
*cp++ = '.';
strcpy (cp, domain);
-/* Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
__nisdomainname[0] = '\0';
else
{
- char *cp = strchr (__nisdomainname, '\0');
+ char *cp = rawmemchr (__nisdomainname, '\0');
/* Missing trailing dot? */
if (cp[-1] != '.')
__nishostname[0] = '\0';
else
{
- char *cp = strchr (__nishostname, '\0');
+ char *cp = rawmemchr (__nishostname, '\0');
int len = cp - __nishostname;
/* Hostname already fully qualified? */
/* DWARF2 exception handling and frame unwind runtime interface routines.
- Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005
+ Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
break;
case DW_CFA_GNU_window_save:
- /* ??? Hardcoded for SPARC register window configuration. */
+ /* ??? Hardcoded for SPARC register window configuration.
+ At least do not do anything for archs which explicitly
+ define a lower register number. */
+#if DWARF_FRAME_REGISTERS < 32
for (reg = 16; reg < 32; ++reg)
{
fs->regs.reg[reg].how = REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = (reg - 16) * sizeof (void *);
}
+#endif
break;
case DW_CFA_GNU_args_size: