diff options
author | zhenwei pi <pizhenwei@bytedance.com> | 2023-09-04 14:10:45 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-11-01 09:19:59 -0400 |
commit | fafb51a67fb883eb2dde352539df939a251851be (patch) | |
tree | b02cb1b745fd89a332d86b8af7ba4e94baa30a3e /tools/testing/radix-tree/linux | |
parent | 327e0ab32cd050513ffaf0aa9234884a2b4ca424 (diff) |
virtio-blk: fix implicit overflow on virtio_max_dma_size
The following codes have an implicit conversion from size_t to u32:
(u32)max_size = (size_t)virtio_max_dma_size(vdev);
This may lead overflow, Ex (size_t)4G -> (u32)0. Once
virtio_max_dma_size() has a larger size than U32_MAX, use U32_MAX
instead.
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Message-Id: <20230904061045.510460-1-pizhenwei@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/testing/radix-tree/linux')
0 files changed, 0 insertions, 0 deletions