lkml.org 
[lkml]   [2018]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pcrypt: use format specifier in kobject_add
On Sat, Oct 27, 2018 at 03:49:26PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Passing string 'name' as the format specifier is potentially hazardous
> because name could (although very unlikely to) have a format specifier
> embedded in it causing issues when parsing the non-existent arguments
> to these. Follow best practice by using the "%s" format string for
> the string 'name'.
>
> Cleans up clang warning:
> crypto/pcrypt.c:397:40: warning: format string is not a string literal
> (potentially insecure) [-Wformat-security]
>
> Fixes: a3fb1e330dd2 ("pcrypt: Added sysfs interface to pcrypt")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> crypto/pcrypt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2018-11-09 10:54    [W:0.300 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site