Searched hist:da99075c1d368315e1508b6143226c0d27b621e0 (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/drivers/xen/xen-pciback/ |
H A D | pci_stub.c | diff 5b71fbdc64225b7a86944f4f0de80e59071187c7 Fri Nov 02 09:36:38 CDT 2012 Jan Beulich <JBeulich@suse.com> xen-pciback: simplify and tighten parsing of device IDs
Now that at least one of the conformance problems of the kernel's sscanf() was addressed (commit da99075c1d368315e1508b6143226c0d27b621e0), we can improve the parsing done in xen-pciback both in terms of code readability and correctness (in particular properly rejecting input strings not well formed).
Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
/openbmc/linux/lib/ |
H A D | vsprintf.c | diff da99075c1d368315e1508b6143226c0d27b621e0 Thu Oct 04 19:13:24 CDT 2012 Jan Beulich <JBeulich@suse.com> lib/vsprintf.c: improve standard conformance of sscanf()
Xen's pciback points out a couple of deficiencies with vsscanf()'s standard conformance:
- Trailing character matching cannot be checked by the caller: With a format string of "(%x:%x.%x) %n" absence of the closing parenthesis cannot be checked, as input of "(00:00.0)" doesn't cause the %n to be evaluated (because of the code not skipping white space before the trailing %n).
- The parameter corresponding to a trailing %n could get filled even if there was a matching error: With a format string of "(%x:%x.%x)%n", input of "(00:00.0]" would still fill the respective variable pointed to (and hence again make the mismatch non-detectable by the caller).
This patch aims at fixing those, but leaves other non-conforming aspects of it untouched, among them these possibly relevant ones:
- improper handling of the assignment suppression character '*' (blindly discarding all succeeding non-white space from the format and input strings),
- not honoring conversion specifiers for %n, - not recognizing the C99 conversion specifier 't' (recognized by vsprintf()).
Signed-off-by: Jan Beulich <jbeulich@suse.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|