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: Sun, 18 Feb 2024 11:22:37 +0100
From: Willy Tarreau <w@....eu>
To: Rodrigo Campos <rodrigo@...g.com.ar>
Cc: Thomas Weißschuh <linux@...ssschuh.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] tools/nolibc: Fix strlcat() return code and size
 usage

On Wed, Feb 14, 2024 at 07:03:10PM -0300, Rodrigo Campos wrote:
> On 2/14/24 16:34, Rodrigo Campos wrote:
> > size_t strlcat_rata(char *dst, const char *src, size_t size)
> > {
> > 	const char *orig_src = src;
> > 	size_t len = 0;
> > 	for (;len < size; len++) {
> > 		if (dst[len] == '\0')
> > 			break;
> > 	}
> 
> If you think about it, this is strnlen() and what follows is strncat().

I agree, I just didn't remember we had strnlen() nor strncat().

Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ