public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Szabolcs Nagy <Szabolcs.Nagy@arm.com>,
	Binutils <binutils@sourceware.org>
Cc: nd <nd@arm.com>
Subject: Re: [PATCH binutils 1/4] aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS
Date: Fri, 24 May 2019 10:24:00 -0000	[thread overview]
Message-ID: <06704c48-fca7-0010-910d-0a3ff50ea354@redhat.com> (raw)
In-Reply-To: <58f77e81-07e8-f194-89ac-e461e2b33da4@arm.com>

Hi Szabolcs,

  A little bit of paranoia...

> +static const char *
> +get_aarch64_symbol_other (unsigned int other)
> +{
> +  static char buf[32];
> +
> +  if (other & STO_AARCH64_VARIANT_PCS)
> +    {
> +      other &= ~STO_AARCH64_VARIANT_PCS;
> +      if (other == 0)
> +	return "VARIANT_PCS";
> +      snprintf (buf, sizeof buf, "VARIANT_PCS | %x", other);
> +      return buf;

On a host where an unsigned int is a 64-bit quantity, it is
theoretically possible for the snprintf function to have to
truncate the output, possibly confusing the user.  Could you
increase the buffer size a little bit please ?

Cheers
  Nick

  reply	other threads:[~2019-05-24 10:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 11:04 [PATCH binutils 0/4] aarch64: Add STO_AARCH64_VARIANT_PCS support Szabolcs Nagy
2019-05-23 11:07 ` [PATCH binutils 1/4] aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS Szabolcs Nagy
2019-05-24 10:24   ` Nick Clifton [this message]
2019-05-24 10:58     ` Jan Beulich
2019-05-24 11:01       ` Nick Clifton
2019-05-23 11:08 ` [PATCH binutils 2/4] aarch64: handle .variant_pcs directive in gas Szabolcs Nagy
2019-05-23 11:10 ` [PATCH binutils 3/4] aarch64: override default elf .set handling " Szabolcs Nagy
2019-05-23 11:11 ` [PATCH binutils 4/4] aarch64: handle STO_AARCH64_VARIANT_PCS in bfd Szabolcs Nagy
2019-05-26  8:51   ` Christophe Lyon
2019-05-28 11:07     ` Szabolcs Nagy
2019-05-24 10:26 ` [PATCH binutils 0/4] aarch64: Add STO_AARCH64_VARIANT_PCS support Nick Clifton
2019-05-24 14:25   ` Szabolcs Nagy
2019-05-24 15:08   ` Szabolcs Nagy
2019-07-05 14:29     ` Szabolcs Nagy
2019-07-08 14:25       ` Szabolcs Nagy

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=06704c48-fca7-0010-910d-0a3ff50ea354@redhat.com \
    --to=nickc@redhat.com \
    --cc=Szabolcs.Nagy@arm.com \
    --cc=binutils@sourceware.org \
    --cc=nd@arm.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).