summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Sheldrake <ejsheldrake@gmail.com>2013-04-06 13:39:38 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-04-08 23:01:20 -0700
commit5d7642ffd0de1d6037f6f98b8733e8a8161e24d3 (patch)
tree6be3f746bbfbf05d64d332332bf991553fea9995
parent36ffc5e0eb50fdda93af3dd7dc3899622e80d3be (diff)
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 <jcristau@debian.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xbacklight.c2
1 files changed, 1 insertions, 1 deletions
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);