summaryrefslogtreecommitdiff
path: root/fs/efivarfs
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-11-18 17:55:07 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 15:58:54 -0800
commit591c5f8a599a58c7c3773027010e537fc1d7a7d5 (patch)
tree13612d7e3c14fec4185ed0bc0b829bf3bef83b79 /fs/efivarfs
parent84a185ec429fe64e5b0d81d7ac815c91578ee569 (diff)
staging: comedi: avoid bad truncation of a size_t in comedi_write()
At one point in `comedi_write()`, the variable `n` gets assigned to the minimum of the parameter `nbytes` and the amount of writeable buffer space. The way that is done currently is unsafe in the unlikely case that `nbytes` exceeds `UINT_MAX`, so fix it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/efivarfs')
0 files changed, 0 insertions, 0 deletions