summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2007-11-11 21:43:12 +0100
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-01 22:42:03 +0100
commitca2a05aa7c72309ee65164c78fa2be7a5038215e (patch)
treef362d7c14652dfea0d93508007f8fc87d10d6980 /init
parentknfsd: fix cache.c comment (diff)
downloadlinux-ca2a05aa7c72309ee65164c78fa2be7a5038215e.tar.xz
linux-ca2a05aa7c72309ee65164c78fa2be7a5038215e.zip
nfsd: Fix handling of negative lengths in read_buf()
The length "nbytes" passed into read_buf should never be negative, but we check only for too-large values of "nbytes", not for too-small values. Make nbytes unsigned, so it's clear that the former tests are sufficient. (Despite this read_buf() currently correctly returns an xdr error in the case of a negative length, thanks to an unsigned comparison with size_of() and bounds-checking in kmalloc(). This seems very fragile, though.) Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions