aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--samples/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/samples/client.c b/samples/client.c
index e8b737f..7e6721f 100644
--- a/samples/client.c
+++ b/samples/client.c
@@ -821,7 +821,8 @@ get_dirty_bitmap(int sock, struct client_dma_region *dma_region,
uint64_t bitmap_size = get_bitmap_size(dma_region->map.size,
sysconf(_SC_PAGESIZE));
- size_t size = sizeof(*res) + sizeof(*report) + bitmap_size;
+ /* Saturating add to keep coverity happy. */
+ size_t size = satadd_u64(sizeof(*res) + sizeof(*report), bitmap_size);
void *data = calloc(1, size);
assert(data != NULL);