diff options
author | Jan Beulich <JBeulich@suse.com> | 2012-12-18 01:01:31 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-18 02:15:18 +0100 |
commit | 53809751ac230a3611b5cdd375f3389f3207d471 (patch) | |
tree | 8555da83945aaba9291f0d9ff09d271043e36263 /lib/percpu-rwsem.c | |
parent | drivers/of/fdt.c: re-use kernel's kbasename() (diff) | |
download | linux-53809751ac230a3611b5cdd375f3389f3207d471.tar.xz linux-53809751ac230a3611b5cdd375f3389f3207d471.zip |
sscanf: don't ignore field widths for numeric conversions
This is another step towards better standard conformance. Rather than
adding a local buffer to store the specified portion of the string (with
the need to enforce an arbitrary maximum supported width to limit the
buffer size), do a maximum width conversion and then drop as much of it as
is necessary to meet the caller's request.
Also fail on negative field widths.
Uses the deprecated simple_strto*() functions because kstrtoXX() fail on
non-zero terminated strings.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions