mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
Update.
2000-10-15 Ulrich Drepper <drepper@redhat.com> * elf/dl-error.c (_dl_signal_error): Allocate memory for objname as well. Reported by Alexander V. Lukyanov <lav@yars.free.net>.
This commit is contained in:
parent
8bf9589991
commit
170ef42fb5
@ -1,3 +1,8 @@
|
||||
2000-10-15 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/dl-error.c (_dl_signal_error): Allocate memory for objname
|
||||
as well. Reported by Alexander V. Lukyanov <lav@yars.free.net>.
|
||||
|
||||
2000-10-13 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* elf/elf.h (R_IA64_PCREL60B): Add relocation.
|
||||
|
@ -76,10 +76,21 @@ _dl_signal_error (int errcode, const char *objname, const char *errstring)
|
||||
/* We are inside _dl_catch_error. Return to it. We have to
|
||||
duplicate the error string since it might be allocated on the
|
||||
stack. The object name is always a string constant. */
|
||||
lcatch->objname = objname;
|
||||
lcatch->errstring = strdup (errstring);
|
||||
if (lcatch->errstring == NULL)
|
||||
lcatch->errstring = _dl_out_of_memory;
|
||||
size_t len_objname = strlen (objname) + 1;
|
||||
size_t len_errstring = strlen (errstring) + 1;
|
||||
|
||||
lcatch->errstring = (char *) malloc (len_objname + len_errstring);
|
||||
if (lcatch->errstring != NULL)
|
||||
/* Make a copy of the object file name and the error string. */
|
||||
lcatch->objname = memcpy (__mempcpy ((char *) lcatch->errstring,
|
||||
errstring, len_errstring),
|
||||
objname, len_objname);
|
||||
else
|
||||
{
|
||||
/* This is better than nothing. */
|
||||
lcatch->objname = objname;
|
||||
lcatch->errstring = _dl_out_of_memory;
|
||||
}
|
||||
longjmp (lcatch->env, errcode ?: -1);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user