diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-02 11:53:56 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-02 11:53:56 -0400 |
commit | c507727ad240b978c6e09e3aa9238080ca9a1c81 (patch) | |
tree | 2ef131d4798845e972b3350fa816cc2ea0bca8e1 /swaybar/i3bar.c | |
parent | Send click events for i3bar blocks (diff) | |
download | sway-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.c | 4 |
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; |