From: Stephen Hemminger <stephen@networkplumber.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Denis Kirjanov' <kirjanov@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Denis Kirjanov <dkirjanov@suse.de>
Subject: Re: [PATCH v3 iproute2] ifstat: convert sprintf to snprintf
Date: Sat, 17 Feb 2024 18:12:37 -0800 [thread overview]
Message-ID: <20240217181237.449d2f59@hermes.local> (raw)
In-Reply-To: <369729fa83564583acbb5c7903641867@AcuMS.aculab.com>
On Sat, 17 Feb 2024 17:51:01 +0000
David Laight <David.Laight@ACULAB.COM> wrote:
> From: Denis Kirjanov
> > Sent: 14 February 2024 12:57
> >
> > Use snprintf to print only valid data
>
> ... to avoid potentially overflowed the temporary buffer.
>
> Also probably worth using scnprintf() to avoid another change
> when snprintf() is removed (because the return value is dangerous).
>
No.
Read the thread, return value is almost never used in iproute2
and where it is, the checks are in place.
next prev parent reply other threads:[~2024-02-18 2:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 12:56 [PATCH v3 iproute2] ifstat: convert sprintf to snprintf Denis Kirjanov
2024-02-17 17:51 ` David Laight
2024-02-18 2:12 ` Stephen Hemminger [this message]
2024-02-18 17:50 ` patchwork-bot+netdevbpf
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=20240217181237.449d2f59@hermes.local \
--to=stephen@networkplumber.org \
--cc=David.Laight@ACULAB.COM \
--cc=dkirjanov@suse.de \
--cc=kirjanov@gmail.com \
--cc=netdev@vger.kernel.org \
/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 NNTP newsgroup(s).