diff options
author | John Levon <john.levon@nutanix.com> | 2024-08-19 11:43:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-19 11:43:44 +0100 |
commit | 3f1500b384cd5aca13b517ebd4055727f35dc14f (patch) | |
tree | 44e6318073354df68d0f76244af4b67b4e326c94 /lib/tran_sock.c | |
parent | a5fca05211a15743ecbc5b375048325d2746d758 (diff) | |
download | libvfio-user-3f1500b384cd5aca13b517ebd4055727f35dc14f.zip libvfio-user-3f1500b384cd5aca13b517ebd4055727f35dc14f.tar.gz libvfio-user-3f1500b384cd5aca13b517ebd4055727f35dc14f.tar.bz2 |
samples: keep coverity quiet (#804)
>>> CID 467268: (INTEGER_OVERFLOW)
>>> Expression "32UL + bitmap_size", which is equal to 31, where
"bitmap_size" is known to be equal to 18446744073709551615, overflows
the type that receives it, an unsigned integer 64 bits wide.
824 size_t size = sizeof(*res) + sizeof(*report) + bitmap_size;
It's correct, this could overflow, though as this is example code, it
doesn't matter. Nonetheless let's make this be a saturating add.
Signed-off-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'lib/tran_sock.c')
0 files changed, 0 insertions, 0 deletions