]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virFileReadLimFD: diagnose maxlen <= 0, rather than passing it on...
authorJim Meyering <meyering@redhat.com>
Wed, 3 Mar 2010 10:42:11 +0000 (11:42 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 5 Mar 2010 17:31:26 +0000 (18:31 +0100)
commit32884a7ef65d4660becdf3f61efa774426760bad
treedf6c05797e70344859e8ac82637d402122168607
parentba918ac1b4159aedb0c209202de35390a1e9e0b9
virFileReadLimFD: diagnose maxlen <= 0, rather than passing it on...

to saferead_lim, which interprets it as a size_t.
* src/util/util.c (virFileReadLimFD): Do not malfunction when
maxlen < -1.  Return -1,EINVAL in that case.  Handle maxlen==0
in the same manner.
src/util/util.c