From c24ec2d55d0f023cabbffce88c9258fea0696cd4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 2 Apr 2014 14:35:09 +0200 Subject: enable more warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blueshift_randr_c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/blueshift_randr_c.c') diff --git a/src/blueshift_randr_c.c b/src/blueshift_randr_c.c index ddc19b9..fe3c708 100644 --- a/src/blueshift_randr_c.c +++ b/src/blueshift_randr_c.c @@ -206,7 +206,7 @@ uint16_t* blueshift_randr_read(int use_crtc) G_gamma = xcb_randr_get_crtc_gamma_green(gamma_get_reply); B_gamma = xcb_randr_get_crtc_gamma_blue(gamma_get_reply); - r_gamma = malloc((3 + R_size + G_size + B_size) * sizeof(uint16_t)); + r_gamma = malloc((3U + (size_t)R_size + (size_t)G_size + (size_t)B_size) * sizeof(uint16_t)); g_gamma = r_gamma + R_size + 1; b_gamma = g_gamma + G_size + 1; if (r_gamma == NULL) -- cgit v1.2.3-70-g09d2