Johannes Berg c6b40d16d1 fix sscanf %n match at end of input string
I was playing with some code that sometimes got a string where a %n
match should have been done where the input string ended, for example
like this:

  sscanf("abc123", "abc%d%n", &a, &n);  /* doesn't work */
  sscanf("abc123a", "abc%d%n", &a, &n); /* works */

However, the scanf function in the kernel doesn't convert the %n in that
case because it has already matched the complete input after %d and just
completely stops matching then. This patch fixes that.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:05 -07:00
..
2005-10-18 08:26:15 -07:00
2006-12-08 08:28:39 -08:00
2006-06-25 10:01:20 -07:00
2005-04-16 15:20:36 -07:00
2006-06-25 10:01:20 -07:00
2005-04-16 15:20:36 -07:00
2007-04-25 22:28:53 -07:00
2005-04-16 15:20:36 -07:00
2007-05-08 11:14:58 -07:00
2005-04-16 15:20:36 -07:00
2007-02-20 17:10:15 -08:00
2005-04-16 15:20:36 -07:00
2006-06-20 20:24:58 -07:00
2006-12-13 09:05:52 -08:00
2006-10-06 08:53:40 -07:00
2007-05-07 12:12:51 -07:00
2006-06-25 10:01:09 -07:00
2007-04-25 22:23:33 -07:00
2005-04-16 15:20:36 -07:00
2006-12-04 02:00:22 -05:00
2007-02-17 19:07:33 +01:00