mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
2004-04-20 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/shm_open.c (shm_unlink): Change EPERM into EACCES. 2004-04-20 Jakub Jelinek <jakub@redhat.com> * stdio-common/vfscanf.c (_IO_vfscanf): Revert last %% whitespace handling change. * stdio-common/tst-sscanf.c (int_tests): Adjust. * nis/nss-nis.c: Include stdlib.h. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Shut up a warning. * sysdeps/sparc/sparc64/memcmp.S (memcmp): Remove BP_SYM () from libc_hidden_builtin_def. 2004-04-20 Jim Meyering <jim@meyering.net> * misc/error.c (error_tail): Don't leak upon realloc failure. 2004-04-20 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): Use RETURN_ADDRESS instead of __builtin_return_address.
This commit is contained in:
13
misc/error.c
13
misc/error.c
@ -1,5 +1,5 @@
|
||||
/* Error handler for noninteractive utilities
|
||||
Copyright (C) 1990-1998, 2000-2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-1998, 2000-2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
|
||||
@ -192,18 +192,19 @@ error_tail (int status, int errnum, const char *message, va_list args)
|
||||
if (wmessage != NULL && len / 2 < ALLOCA_LIMIT)
|
||||
wmessage = NULL;
|
||||
|
||||
wmessage = (wchar_t *) realloc (wmessage,
|
||||
len * sizeof (wchar_t));
|
||||
|
||||
if (wmessage == NULL)
|
||||
wchar_t *p = (wchar_t *) realloc (wmessage,
|
||||
len * sizeof (wchar_t));
|
||||
if (p == NULL)
|
||||
{
|
||||
free (wmessage);
|
||||
fputws_unlocked (L"out of memory\n", stderr);
|
||||
return;
|
||||
}
|
||||
wmessage = p;
|
||||
}
|
||||
|
||||
memset (&st, '\0', sizeof (st));
|
||||
tmp =message;
|
||||
tmp = message;
|
||||
}
|
||||
while ((res = mbsrtowcs (wmessage, &tmp, len, &st)) == len);
|
||||
|
||||
|
Reference in New Issue
Block a user