]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/strutils: move array bounds check in string_to_idarray() to appropriate place.
authorChandan B Rajenda <chandan@linux.vnet.ibm.com>
Thu, 23 Feb 2012 09:17:28 +0000 (10:17 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Feb 2012 09:54:25 +0000 (10:54 +0100)
commit179b923a19c717bcf03c2921c1c80dfebbb7075a
treed243280e7d7cbd9e7d862b1bcb73326a3d2c013e
parent476b508e043b6b4c71d84b4f2fdeeffa68c204b3
lib/strutils: move array bounds check in string_to_idarray() to appropriate place.

string_to_idarray() will incorrectly exit with an error when the last element
of the passed in array gets filled. However it should only exit with an error
if there is more input. To fix this move the array bounds check.

Signed-off-by: Chandan B Rajenda <chandan@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
lib/strutils.c