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: <1500991734.2615.1.camel@redhat.com>
Date:   Tue, 25 Jul 2017 16:08:54 +0200
From:   Matteo Croce <mcroce@...hat.com>
To:     David Laight <David.Laight@...LAB.COM>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:     Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH] netns: more input validation

Il giorno mar, 25/07/2017 alle 13.47 +0000, David Laight ha scritto:
> Think I'd check:
> 	!name[0] || !memchr(name, 0, NAME_MAX) || strchr(name, '/') ||
> 		(name[0] == '.' && (!name[1] || (name[1] == '.' &&
> !name[2])))
> 
> 	David

Nice optimization, but as strchr() and strcmp() are builtin functions,
at least in GCC, I don't know if there is any real advantage.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ