[PATCH:xbacklight] Fix reading backlight level on 64-bit systems (bug 63205)
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Apr 6 09:36:14 PDT 2013
From: Edward Sheldrake <ejsheldrake at gmail.com>
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
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
xbacklight.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbacklight.c b/xbacklight.c
index 2189095..27f9046 100644
--- a/xbacklight.c
+++ b/xbacklight.c
@@ -88,7 +88,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);
--
1.7.9.2
More information about the xorg-devel
mailing list