[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <331c1b3b-4dbe-48e7-9e75-0536528a8868@suse.de>
Date: Sun, 11 Feb 2024 11:39:13 +0300
From: Denis Kirjanov <dkirjanov@...e.de>
To: Stephen Hemminger <stephen@...workplumber.org>,
Denis Kirjanov <kirjanov@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v2 iproute2] ifstat: convert sprintf to snprintf
On 2/10/24 23:33, Stephen Hemminger wrote:
> On Fri, 2 Feb 2024 04:35:27 -0500
> Denis Kirjanov <kirjanov@...il.com> wrote:
>
>> Use snprintf to print only valid data
>>
>> v2: adjust formatting
>>
>> Signed-off-by: Denis Kirjanov <dkirjanov@...e.de>
>> ---
>
> Tried this but compile failed
>
> ifstat.c:896:2: warning: 'snprintf' size argument is too large; destination buffer has size 107, but size argument is 108 [-Wfortify-source]
> snprintf(sun.sun_path + 1, sizeof(sun.sun_path), "ifstat%d", getuid());
Right, this is addressed in the patch with scnprintf
Powered by blists - more mailing lists