aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/i3bar.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-02 11:53:56 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-04-02 11:53:56 -0400
commitc507727ad240b978c6e09e3aa9238080ca9a1c81 (patch)
tree2ef131d4798845e972b3350fa816cc2ea0bca8e1 /swaybar/i3bar.c
parentSend click events for i3bar blocks (diff)
downloadsway-c507727ad240b978c6e09e3aa9238080ca9a1c81.tar.gz
sway-c507727ad240b978c6e09e3aa9238080ca9a1c81.tar.zst
sway-c507727ad240b978c6e09e3aa9238080ca9a1c81.zip
Fix use-after-free with block hotspots
Diffstat (limited to 'swaybar/i3bar.c')
-rw-r--r--swaybar/i3bar.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c
index 5e98c4aa..46459e24 100644
--- a/swaybar/i3bar.c
+++ b/swaybar/i3bar.c
@@ -30,9 +30,7 @@ static bool i3bar_parse_json(struct status_line *status, const char *text) {
30 status_error(status, "[failed to parse i3bar json]"); 30 status_error(status, "[failed to parse i3bar json]");
31 return false; 31 return false;
32 } 32 }
33 if (json_object_array_length(results) < 1) { 33 wlr_log(L_DEBUG, "Got i3bar json: '%s'", text);
34 return true;
35 }
36 for (size_t i = 0; i < json_object_array_length(results); ++i) { 34 for (size_t i = 0; i < json_object_array_length(results); ++i) {
37 json_object *full_text, *short_text, *color, *min_width, *align, *urgent; 35 json_object *full_text, *short_text, *color, *min_width, *align, *urgent;
38 json_object *name, *instance, *separator, *separator_block_width; 36 json_object *name, *instance, *separator, *separator_block_width;