Skip to content

Commit

Permalink
[Wayland] Fix CodeQL overflow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lbonn committed Mar 6, 2024
1 parent d8ba203 commit 47ae31e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/wayland/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 47ae31e

Please sign in to comment.