public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Nick Clifton <nickc@redhat.com>
Cc: Mark Harmstone <mark@harmstone.com>, Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] ld/PDB: fix off-by-1 in add_globals_ref()
Date: Wed, 12 Jul 2023 09:55:57 +0200	[thread overview]
Message-ID: <62306e09-61cd-0a8e-f052-1e34b357936f@suse.com> (raw)
In-Reply-To: <e964f7db-4213-50ce-42ae-f5d29d320d82@harmstone.com>

On 11.07.2023 01:30, Mark Harmstone wrote:
> Thanks Jan - this looks good to me.

I've committed this yesterday, so Nick - what about cherry-picking it onto
the branch?

Jan

> On 7/7/23 14:47, Jan Beulich wrote:
>> Copying one too many bytes can corrupt memory, detected and reported by
>> glibc on a 32-bit distro.
>> ---
>> Nick, again I expect this wants to go on the branch as well. I'm sorry
>> that I didn't get to look into this earlier; I had noticed it a while
>> ago already. In any event I'd like to give Mark a little bit of time
>> to reply (if necessary), before putting it in.
>>
>> --- a/ld/pdb.c
>> +++ b/ld/pdb.c
>> @@ -880,7 +880,7 @@ add_globals_ref (struct globals *glob, b
>>     g->offset = bfd_tell (sym_rec_stream);
>>     g->hash = hash;
>>     g->refcount = 1;
>> -  memcpy (g->data, data, len + 1);
>> +  memcpy (g->data, data, len);
>>   
>>     glob->num_entries++;
>>   
> 
> 


  reply	other threads:[~2023-07-12  7:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 13:47 Jan Beulich
2023-07-10 23:30 ` Mark Harmstone
2023-07-12  7:55   ` Jan Beulich [this message]
2023-07-17 12:26     ` Nick Clifton

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=62306e09-61cd-0a8e-f052-1e34b357936f@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=mark@harmstone.com \
    --cc=nickc@redhat.com \
    /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).