From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Kees Cook <keescook@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Joe Perches <joe@perches.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: string_escape_mem ESCAPE_SPACE
Date: Thu, 23 Jul 2015 23:27:09 +0300 [thread overview]
Message-ID: <1437683229.29746.49.camel@linux.intel.com> (raw)
In-Reply-To: <CAGXu5j+=R+ZbM--Bx3HOAwDhQtQ-zhBNvsU58MdEo+ASr3ji5g@mail.gmail.com>
On Thu, 2015-07-23 at 12:59 -0700, Kees Cook wrote:
> Hi,
>
> I'm curious why ESCAPE_SPACE doesn't escape spaces (0x20)?
Space is a printable character.
You perhaps wants something like ESCAPE_SPACE | ESCAPE_HEX.
> That is
> surprising to me, especially since things like isspace() include
> 0x20.
Moreover, there are test cases in test-string_helpers.c module and they
are based on the real use cases (before helpers were introduced and
users were converted). So, there is no user which expects hex conversio
n of the printable character if not asked explicitly.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2015-07-23 20:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 19:59 string_escape_mem ESCAPE_SPACE Kees Cook
2015-07-23 20:27 ` Andy Shevchenko [this message]
2015-07-23 20:36 ` Kees Cook
2015-07-23 20:50 ` Andy Shevchenko
2015-07-23 22:57 ` Kees Cook
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=1437683229.29746.49.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=keescook@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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