mirror of
https://github.com/lbonn/rofi
synced 2024-11-22 03:43:09 +00:00
[Wayland] Fix CodeQL overflow warning
This commit is contained in:
parent
d8ba203f6e
commit
47ae31eb5d
1 changed files with 5 additions and 1 deletions
|
@ -166,7 +166,11 @@ wayland_buffer_pool *display_buffer_pool_new(gint width, gint height) {
|
|||
size_t pool_size;
|
||||
|
||||
stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);
|
||||
size = stride * height;
|
||||
if (stride < 0) {
|
||||
g_warning("cairo stride width calculation failure");
|
||||
return NULL;
|
||||
}
|
||||
size = (size_t)stride * height;
|
||||
pool_size = size * wayland->buffer_count;
|
||||
|
||||
gchar filename[PATH_MAX];
|
||||
|
|
Loading…
Reference in a new issue