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] [day] [month] [year] [list]
Date:	Thu, 25 Jun 2015 11:19:42 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Luis de Bethencourt <luis@...ethencourt.com>
Cc:	Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	devel@...verdev.osuosl.org, Kirk Reiser <kirk@...sers.ca>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	speakup@...ux-speakup.org,
	Melike Yurtoglu <aysemelikeyurtoglu@...il.com>,
	linux-kernel@...r.kernel.org,
	Domagoj Trsan <domagoj.trsan@...il.com>,
	Samuel Thibault <samuel.thibault@...-lyon.org>,
	Chris Brannon <chris@...-brannons.com>
Subject: Re: [PATCH] staging: speakup: replace simple_strtoul() with
 kstrtoint()

Probably once you start writing a patch you will figure it out.  :)

keymap_store() is a crap function.  We have the cp1 pointer that points
to the end of two back to back 3 char arrays.  The name cp1 is because
it is the second copy of the cp buffer which is a copy of the buf
buffer.  Since it is a backwards array we use cp1[-3] where normally we
would say array[0] and cp1[-1] to mean the last element in the array.

We need around 6 characters in cp1, but we are only garaunteed to have
2.  There is no checking.

Lots of checkpatch.pl warnings.

Just focus on cleaning up keymap_store() and hopefully at the end you
can just delete spk_s2uchar().

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ