[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240131081418.72770d85@hermes.local>
Date: Wed, 31 Jan 2024 08:14:18 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Denis Kirjanov <kirjanov@...il.com>
Cc: netdev@...r.kernel.org, Denis Kirjanov <dkirjanov@...e.de>
Subject: Re: [PATCH iproute2] ifstat: convert sprintf to snprintf
On Wed, 31 Jan 2024 07:41:07 -0500
Denis Kirjanov <kirjanov@...il.com> wrote:
> @@ -893,7 +893,7 @@ int main(int argc, char *argv[])
>
> sun.sun_family = AF_UNIX;
> sun.sun_path[0] = 0;
> - sprintf(sun.sun_path+1, "ifstat%d", getuid());
> + snprintf(sun.sun_path+1, sizeof(sun.sun_path), "ifstat%d", getuid());
If you are changing the line, please add spaces around plus sign
p
Powered by blists - more mailing lists