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: <20170619053828.GB25320@kroah.com>
Date:   Mon, 19 Jun 2017 13:38:28 +0800
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Joe Perches <joe@...ches.com>
Cc:     Okash Khawaja <okash.khawaja@...il.com>,
        Jiri Slaby <jslaby@...e.com>,
        Samuel Thibault <samuel.thibault@...-lyon.org>,
        linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
        Kirk Reiser <kirk@...sers.ca>, speakup@...ux-speakup.org,
        Chris Brannon <chris@...-brannons.com>
Subject: Re: [patch v2 2/3] staging: speakup: check and convert dev name or
 ser to dev_t

On Sun, Jun 18, 2017 at 10:33:35PM -0700, Joe Perches wrote:
> On Mon, 2017-06-19 at 09:15 +0800, Greg Kroah-Hartman wrote:
> > On Sun, Jun 18, 2017 at 09:58:27AM +0100, Okash Khawaja wrote:
> > > This patch adds functionality to validate and convert either a device
> > > name or 'ser' member of synth into dev_t.
> []
> > > --- a/drivers/staging/speakup/spk_ttyio.c
> []
> > > +int ser_to_dev(int ser, dev_t *dev_no)
> > > +{
> > > +	if (ser < 0 || ser > (255 - 64)) {
> > > +                pr_err("speakup: Invalid ser param. \
> > > +				Must be between 0 and 191 inclusive.\n");
> > 
> > As Andy pointed out, never do this for a C string, it's not doing what
> > you think it is :)
> 
> Well, some guy.
> 
> > Worse case, do this like the following:
> > 		pr_err("speakup: Invalid ser param."
> > 			"Must be between 0 and 191 inclusive.\n");
> 
> Nope, now there's no space between param and Must.
> 
> Using string concatenation on multiple lines is error prone.

Ah, yes it is, see, I messed it up!  :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ