mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-07 11:55:10 +00:00
dcc_compress_image: fix a possible overflow when calculating image_size
Both src->stride and src->y are uint32_t Fixed by making one of them uint64_t Found by coverity Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
37e4cae9d4
commit
4cb02250f4
@ -767,7 +767,7 @@ lz_compress:
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
uint64_t image_size = src->stride * src->y;
|
||||
uint64_t image_size = src->stride * (uint64_t)src->y;
|
||||
stat_compress_add(&display_channel->encoder_shared_data.off_stat, start_time, image_size, image_size);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user