From 5d7642ffd0de1d6037f6f98b8733e8a8161e24d3 Mon Sep 17 00:00:00 2001 From: Edward Sheldrake Date: Sat, 6 Apr 2013 13:39:38 +0100 Subject: Fix reading backlight level on 64-bit systems (bug 63205) obviously incorrect output of "xbacklight -get": 51671552015166906368.000000 valgrind reports an invalid read of size 8 at xbacklight.c:91 https://bugs.freedesktop.org/show_bug.cgi?id=63205 Reviewed-by: Julien Cristau Signed-off-by: Alan Coopersmith --- xbacklight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xbacklight.c b/xbacklight.c index 0614f03..214bd32 100644 --- a/xbacklight.c +++ b/xbacklight.c @@ -87,7 +87,7 @@ backlight_get (xcb_connection_t *conn, xcb_randr_output_t output) prop_reply->format != 32) { value = -1; } else { - value = *((long *) xcb_randr_get_output_property_data (prop_reply)); + value = *((int32_t *) xcb_randr_get_output_property_data (prop_reply)); } free (prop_reply); -- cgit v1.2.3