]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-intel.c
load_sys(): Add a buffer size argument
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 4 Mar 2016 21:00:21 +0000 (16:00 -0500)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Mar 2016 16:35:34 +0000 (11:35 -0500)
commit193b6c0b26e2a722691ab7d8f67604429b0c9ac6
treea81ce2851e83adb16dc051cf1c1bccd17467503c
parent2a1990c0f4bbb00920fafe7c8eec1b8837595d48
load_sys(): Add a buffer size argument

This adds a buffer size argument to load_sys(), rather than relying on
a hard coded buffer size. The old behavior was safe because we knew
the kernel would never return strings overrunning the buffers, however
it was ugly, and would cause code checking tools to spit out warnings.

This caused a Coverity warning over the read into
sra->sysfs_array_state which is only 20 bytes.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Detail.c
mdadm.h
super-intel.c
sysfs.c