aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2021-03-22 09:01:00 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2021-03-22 14:10:53 +0100
commit03daa53a0ef63d2a72acda05e94e5ba5c0b50d33 (patch)
treecd822bf55717b0b128538e2686f7f754ec229b1f /sway/tree/view.c
parentswaybar: use INT_MAX max JSON depth when parsing IPC response (diff)
downloadsway-03daa53a0ef63d2a72acda05e94e5ba5c0b50d33.tar.gz
sway-03daa53a0ef63d2a72acda05e94e5ba5c0b50d33.tar.zst
sway-03daa53a0ef63d2a72acda05e94e5ba5c0b50d33.zip
swaybar: fail gracefully on tokener creation fail
This commit adds missing error-handling to the creation of the tokener instance. The stack depth parameter is used to initialize an array that json-c prefaults ahead of time, causing INT_MAX to result in out of memory errors. Also drop the depth to 256 to prevent this OOM. Though this fix is not very satisfactory -- json-c could be made to not prefault -- it should do for now. At the very least, swaybar will not crash. Fixes #6126.
Diffstat (limited to 'sway/tree/view.c')
0 files changed, 0 insertions, 0 deletions