From: Matteo Croce <mcroce@redhat•com>
To: David Laight <David.Laight@ACULAB•COM>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>
Cc: Stephen Hemminger <stephen@networkplumber•org>
Subject: Re: [PATCH] netns: more input validation
Date: Tue, 25 Jul 2017 16:08:54 +0200 [thread overview]
Message-ID: <1500991734.2615.1.camel@redhat.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DD003FE88@AcuExch.aculab.com>
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.
next prev parent reply other threads:[~2017-07-25 14:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 13:30 [PATCH] netns: more input validation Matteo Croce
2017-07-25 13:47 ` David Laight
2017-07-25 14:08 ` Matteo Croce [this message]
2017-07-27 18:26 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1500991734.2615.1.camel@redhat.com \
--to=mcroce@redhat$(echo .)com \
--cc=David.Laight@ACULAB$(echo .)COM \
--cc=netdev@vger$(echo .)kernel.org \
--cc=stephen@networkplumber$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox