summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-11-18 20:55:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-22 02:58:54 +0300
commit591c5f8a599a58c7c3773027010e537fc1d7a7d5 (patch)
tree13612d7e3c14fec4185ed0bc0b829bf3bef83b79 /scripts/gdb/linux/utils.py
parent84a185ec429fe64e5b0d81d7ac815c91578ee569 (diff)
downloadlinux-591c5f8a599a58c7c3773027010e537fc1d7a7d5.tar.xz
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 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions