public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Preston <thomas.preston@codethink.co.uk>
To: akpm@linux-foundation.org, pmladek@suse.com,
	andriy.shevchenko@linux.intel.com, rostedt@goodmis.org,
	geert+renesas@glider.be, corbet@lwn.net, me@tobin.cc,
	sergey.senozhatsky@gmail.com, linux-kernel@vger.kernel.org
Cc: Thomas Preston <thomas.preston@codethink.co.uk>
Subject: [PATCH 0/2] vsprintf Stop using obsolete simple_strtoul()
Date: Tue, 11 Dec 2018 15:21:11 +0000	[thread overview]
Message-ID: <20181211152113.8523-1-thomas.preston@codethink.co.uk> (raw)

Hi,
We've fixed a bug with sscanf(). When passing in a 16-digit hex-string like so:

	sscanf("fafafafa0b0b0b0b", "%8x%8x", &hi, &lo)

The resulting value in hi is always 0. This is because vsscanf() uses the
obsolete and broken functions simple_strtoul() and simple_strtoull(), which we
have replaced.

Many thanks,
Thomas

Thomas Preston (2):
  vsprintf: Specify type for union val members
  vsprintf: Stop using obsolete simple_strtoul()

 lib/vsprintf.c | 66 ++++++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 43 insertions(+), 23 deletions(-)

-- 
2.11.0


             reply	other threads:[~2018-12-11 15:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 15:21 Thomas Preston [this message]
2018-12-11 15:21 ` [PATCH 1/2] vsprintf: Specify type for union val members Thomas Preston
2018-12-11 15:21 ` [PATCH 2/2] vsprintf: Stop using obsolete simple_strtoul() Thomas Preston
2018-12-11 17:22   ` Linus Torvalds
2018-12-11 18:04     ` Andy Shevchenko
2018-12-11 18:19       ` Linus Torvalds
2018-12-11 21:30         ` Andy Shevchenko

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=20181211152113.8523-1-thomas.preston@codethink.co.uk \
    --to=thomas.preston@codethink.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@tobin.cc \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    /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