Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754207AbbGWU1d (ORCPT ); Thu, 23 Jul 2015 16:27:33 -0400 Received: from mga14.intel.com ([192.55.52.115]:18001 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754055AbbGWU12 (ORCPT ); Thu, 23 Jul 2015 16:27:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,533,1432623600"; d="scan'208";a="529210509" Message-ID: <1437683229.29746.49.camel@linux.intel.com> Subject: Re: string_escape_mem ESCAPE_SPACE From: Andy Shevchenko To: Kees Cook Cc: LKML , Joe Perches , Andrew Morton Date: Thu, 23 Jul 2015 23:27:09 +0300 In-Reply-To: References: Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 889 Lines: 25 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 Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/