lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ