From: Ulrich Drepper Date: Thu, 28 Dec 2000 04:19:14 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/glibc-2_2_1~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7231f6f94092b683c884d8348b056a57f9755c98;p=platform%2Fupstream%2Fglibc.git Update. 2000-12-27 Ben Collins * elf/dl-open.c (_dl_open): Correctly set the new objname pointer when reallocating the error strings. Reported by Kalle Olavi Niemitalo --- diff --git a/ChangeLog b/ChangeLog index 6cc3f21..ead33ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-12-27 Ben Collins + + * elf/dl-open.c (_dl_open): Correctly set the new objname pointer + when reallocating the error strings. + Reported by Kalle Olavi Niemitalo + 2000-12-27 Ulrich Drepper * dlfcn/Makefile (tests): Add errmsg1. diff --git a/elf/dl-open.c b/elf/dl-open.c index 9035579..931e226 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -403,9 +403,9 @@ _dl_open (const char *file, int mode, const void *caller) len_errstring = strlen (errstring) + 1; if (objname == errstring + len_errstring) { - len_errstring += strlen (objname) + 1; - local_errstring = alloca (len_errstring); - memcpy (local_errstring, errstring, len_errstring); + size_t total_len = len_errstring + strlen (objname) + 1; + local_errstring = alloca (total_len); + memcpy (local_errstring, errstring, total_len); objname = local_errstring + len_errstring; } else