[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240217181237.449d2f59@hermes.local>
Date: Sat, 17 Feb 2024 18:12:37 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: David Laight <David.Laight@...LAB.COM>
Cc: 'Denis Kirjanov' <kirjanov@...il.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, Denis Kirjanov <dkirjanov@...e.de>
Subject: Re: [PATCH v3 iproute2] ifstat: convert sprintf to snprintf
On Sat, 17 Feb 2024 17:51:01 +0000
David Laight <David.Laight@...LAB.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.
Powered by blists - more mailing lists