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]
Message-ID: <20240803183324.GB29716@1wt.eu>
Date: Sat, 3 Aug 2024 20:33:24 +0200
From: Willy Tarreau <w@....eu>
To: Thomas Weißschuh <thomas@...ch.de>
Cc: Thomas Weißschuh <linux@...ssschuh.net>,
        Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 06/12] selftests/nolibc: avoid passing NULL to
 printf("%s")

On Sat, Aug 03, 2024 at 08:29:14PM +0200, Thomas Weißschuh  wrote:
> Aug 3, 2024 11:34:03 Willy Tarreau <w@....eu>:
> 
> > On Sun, Jul 28, 2024 at 12:10:00PM +0200, Thomas Weißschuh wrote:
> >> Clang on higher optimization levels detects that NULL is passed to
> >> printf("%s") and warns about it.
> >> Avoid the warning.
> >
> > I don't see why this would be a problem, we do explicitly check for
> > NULL in our printf implementation and print "(null)". Or maybe it is
> > upset due to the attribute(printf) ? I don't know what the standard
> > says regarding %s and NULL, though. If it says that NULL is forbidden
> > then I can understand the warning and your fix is indeed correct. In
> > any case it's not worth fighting with a compiler for nolibc-test, but
> > it's probably worth mentioning in the commit message that it warns
> > despite the check being already done.
> 
> It's undefined as per POSIX.
> I'll update the commit message.

OK, works for me!

Thanks,
Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ