labwc/include/common
tokyo4j 70fb713874 img: fix UAF on Reconfigure by refcounting
Before this commit, there was a use-after-free bug on Reconfigure:
- theme_finish() destroys lab_imgs for titlebar icons
- For some reason, undecorate() calls _create_buffer() in
  scaled-img-buffer.c, which calls img_render() on a destroyed lab_img.

So in this commit, the lifetime of lab_img is expanded to when the
scaled_img_buffers referencing it are all destroyed. This is achieved by
calling lab_img_copy() when setting a lab_img to scaled_img_buffer and
calling lab_img_destroy() when clearing a lab_img.

Now that scaled_img_buffer.img are always different, lab_img_equal() is
added to compare the content of scaled_img_buffer.img.
2025-01-04 09:10:02 +01:00
..
array.h common/array.h: add array_add() helper 2024-08-03 18:25:23 +02:00
border.h Move border-struct to common/border.h for sharing 2023-06-26 06:04:07 +01:00
box.h ssd: rework titlebar button rendering 2024-12-23 18:11:32 +09:00
buf.h buf: add buf_add_fmt() 2024-08-21 16:09:44 +02:00
dir.h config: support merging multiple config files 2024-01-18 20:20:36 +00:00
direction.h action: make "FocusOutput" behave like "MoveToOutput" 2024-08-24 14:59:42 -04:00
fd-util.h Replace _ with - in source file names 2024-05-22 07:10:51 +01:00
file-helpers.h common/file-helpers.c: share file_exists() to reduce duplication 2023-09-17 19:26:41 +01:00
font.h scaled-scene-buffer: reduce unnecessary renderings 2024-12-18 17:21:29 +09:00
grab-file.h common: remove buf_init(), add BUF_INIT and buf_move() 2024-04-18 07:00:23 +01:00
graphic-helpers.h buffer: always set buffer->{cairo,surface} for simplification 2024-11-28 18:56:03 +09:00
list.h common/list: add WL_LIST_INIT() macro 2024-11-21 20:31:41 +00:00
macros.h edges, resistance, snap: unified resistance and snapping engine 2024-01-30 15:02:17 -05:00
match.h docs: simplify description of shell wildcard patterns 2024-12-01 20:17:04 +01:00
mem.h common/mem.h: introduce xstrdup_replace() 2024-11-16 22:13:17 +00:00
nodename.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
parse-bool.h Make enum three_state public 2024-12-31 16:23:47 +00:00
parse-double.h common: validate and properly parse floats 2024-04-02 10:37:50 -04:00
scaled-font-buffer.h font: remove arrow character from font buffer 2024-12-14 20:09:53 +00:00
scaled-img-buffer.h img: fix UAF on Reconfigure by refcounting 2025-01-04 09:10:02 +01:00
scaled-rect-buffer.h Add scaled_rect_buffer 2024-11-25 19:41:07 +00:00
scaled-scene-buffer.h scaled-scene-buffer: reduce unnecessary renderings 2024-12-18 17:21:29 +09:00
scene-helpers.h magnifier: fix flickering on simultaneous gamma changes 2024-06-29 23:36:41 +02:00
set.h key-state.c: generalize set operations 2024-10-13 20:45:16 +01:00
spawn.h Add -S|--session <command> option 2024-04-14 13:05:25 +02:00
string-helpers.h string-helpers.c: add str_starts_with() 2024-12-18 18:32:25 +00:00
surface-helpers.h cursor: process layer subsurfaces in cursor_button_press() 2024-03-09 00:44:19 +01:00
three-state.h Make enum three_state public 2024-12-31 16:23:47 +00:00