sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 82227d6103940bade22d7fa1e63256228df37b9e
parent 85a4b19ac44f766561d4b47f587d97575c780ad0
Author: Félix Poisot <felix@lhfblc.fr>
Date:   Fri, 20 Mar 2026 08:47:57 +0000

common/pango: get_text_size out pointers may be NULL

Fixes: 2c2a2ec38055092f368b44d4affefdfa8df17ff9
Closes: https://github.com/swaywm/sway/issues/9082

Diffstat:
Mcommon/pango.c | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/pango.c b/common/pango.c @@ -84,7 +84,15 @@ PangoLayout *get_pango_layout(cairo_t *cairo, const PangoFontDescription *desc, void get_text_size(cairo_t *cairo, const PangoFontDescription *desc, int *width, int *height, int *baseline, double scale, bool markup, const char *fmt, ...) { - *width = *height = *baseline = 0; + if (width) { + *width = 0; + } + if (height) { + *height = 0; + } + if (baseline) { + *baseline = 0; + } va_list args; va_start(args, fmt);