public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: stsp <stsp2@yandex.ru>
To: Andreas Schwab <schwab@suse.de>,
	Stas Sergeev via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 1/2] elf: strdup() l_name if no realname [BZ #30100]
Date: Wed, 15 Feb 2023 18:33:45 +0500	[thread overview]
Message-ID: <03f0825e-7d30-9c9a-1c7a-f3a805a98a60@yandex.ru> (raw)
In-Reply-To: <mvm3577t8bb.fsf@suse.de>

Hi,

15.02.2023 17:35, Andreas Schwab пишет:
> On Feb 15 2023, Stas Sergeev via Libc-alpha wrote:
>
>> diff --git a/elf/dl-object.c b/elf/dl-object.c
>> index f1f2ec956c..c92daf37d1 100644
>> --- a/elf/dl-object.c
>> +++ b/elf/dl-object.c
>> @@ -122,7 +122,7 @@ _dl_new_object (char *realname, const char *libname, int type,
>>   #endif
>>       new->l_name = realname;
>>     else
>> -    new->l_name = (char *) newname->name + libname_len - 1;
>> +    new->l_name = __strdup ((char *) newname->name + libname_len - 1);
> Since the point of that assignment is to create a pointer to an
> allocated empty string, it would be better to make that explicit by
> using __strdup (""), with a suitable adjustment of the comment.
Done and re-sent.

  reply	other threads:[~2023-02-15 13:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 11:21 [PATCH v5 0/2] implement dlmem() with audit extension Stas Sergeev
2023-02-15 11:21 ` [PATCH 1/2] elf: strdup() l_name if no realname [BZ #30100] Stas Sergeev
2023-02-15 12:35   ` Andreas Schwab
2023-02-15 13:33     ` stsp [this message]
2023-02-15 11:21 ` [PATCH 2/2] dlfcn,elf: implement dlmem() function [BZ #11767] Stas Sergeev
  -- strict thread matches above, loose matches on Subject: below --
2023-02-15 13:32 [PATCH v6 0/2] implement dlmem() with audit extension Stas Sergeev
2023-02-15 13:32 ` [PATCH 1/2] elf: strdup() l_name if no realname [BZ #30100] Stas Sergeev
2023-02-14  8:41 [PATCH v4 0/2] implement dlmem() function Stas Sergeev
2023-02-14  8:41 ` [PATCH 1/2] elf: strdup() l_name if no realname [BZ #30100] Stas Sergeev
2023-02-13 13:23 [PATCH v3 0/2] implement dlmem() function Stas Sergeev
2023-02-13 13:23 ` [PATCH 1/2] elf: strdup() l_name if no realname [BZ #30100] Stas Sergeev
2023-02-10 14:07 Stas Sergeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03f0825e-7d30-9c9a-1c7a-f3a805a98a60@yandex.ru \
    --to=stsp2@yandex.ru \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).