summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2019-01-11 23:13:09 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-01-12 18:17:56 +0000
commitb119d3bc328e7a9574861ebe0c2110e2776c2de1 (patch)
treea4e67c3d098b377d3f90923622e2923e1a1449b8 /security
parent9bcf15f75cac3c6a00d8f8083a635de9c8537799 (diff)
downloadlinux-b119d3bc328e7a9574861ebe0c2110e2776c2de1.tar.bz2
tools: iio: iio_generic_buffer: make num_loops signed
Currently, num_loops is unsigned, but it's set by strtoll, which returns a (signed) long long int. This could lead to overflow, and it also makes the check "num_loops < 0" always be false, since num_loops is unsigned. Setting num_loops to -1 to loop forever is almost working because num_loops is getting set to a very high number, but it's technically still incorrect. Fix this issue by making num_loops signed. This also fixes an error found by Smatch. Signed-off-by: Martin Kelly <mkelly@xevo.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: 55dda0abcf9d ("tools: iio: iio_generic_buffer: allow continuous looping") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions