]> Git Repo - linux.git/commit - lib/bitmap.c
lib/bitmap.c: fix a special string handling bug in __bitmap_parselist
authorPan Xinhui <[email protected]>
Wed, 9 Sep 2015 22:37:05 +0000 (15:37 -0700)
committerLinus Torvalds <[email protected]>
Thu, 10 Sep 2015 20:29:01 +0000 (13:29 -0700)
commitd9282cb66353be502aae09aae75d05a6863eb979
tree78ae23870c4f19225303b2d820cebd87aa1153ed
parentd21c3d4d1c6b2a0b85aeae5cc774b1bacc64e5b4
lib/bitmap.c: fix a special string handling bug in __bitmap_parselist

If string end with '-', for exapmle, bitmap_parselist("1,0-",&mask,
nmaskbits), It is not in a valid pattern, so add a check after loop.
Return -EINVAL on such condition.

Signed-off-by: Pan Xinhui <[email protected]>
Cc: Yury Norov <[email protected]>
Cc: Chris Metcalf <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Sudeep Holla <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/bitmap.c
This page took 0.04987 seconds and 4 git commands to generate.