From 642ab359888756ea598369eb8cec451072f1b80c Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 9 Mar 2014 20:22:44 +0100 Subject: [PATCH] xproperty: Don't limit property lengths All that I can say is "oops, I blame copy&paste". Thanks to Elv13 for noticing this. Signed-off-by: Uli Schlachter --- objects/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/objects/window.c b/objects/window.c index f0e9741f3..46060bb6f 100644 --- a/objects/window.c +++ b/objects/window.c @@ -363,11 +363,13 @@ luaA_window_get_xproperty(lua_State *L) xcb_atom_t type; void *data; xcb_get_property_reply_t *reply; + uint32_t length; type = prop->type == PROP_STRING ? UTF8_STRING : XCB_ATOM_CARDINAL; + length = prop->type == PROP_STRING ? UINT32_MAX : 1; reply = xcb_get_property_reply(globalconf.connection, xcb_get_property_unchecked(globalconf.connection, false, w->window, - prop->atom, type, 0, 4), NULL); + prop->atom, type, 0, length), NULL); if(!reply) return 0;