From 84c0ee63cf4a67e7fb8484ef874b121160b63382 Mon Sep 17 00:00:00 2001 From: byte Date: Sat, 17 Jan 2026 02:49:56 +0000 Subject: segfault fix --- html.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'html.c') diff --git a/html.c b/html.c index a11b448..b4cb1c7 100644 --- a/html.c +++ b/html.c @@ -167,6 +167,7 @@ xs_str *actor_pronouns(xs_dict *actor) { const xs_list *attachment; const xs_dict *d; + const char *v; const char *pronouns = ""; xs_str *ret; @@ -175,7 +176,9 @@ xs_str *actor_pronouns(xs_dict *actor) xs *prop = xs_utf8_to_lower(xs_dict_get(d, "name")); /* make sure that we are reading the correct metadata */ if (strlen(prop) == 8 && strcmp(prop, "pronouns") == 0) { - pronouns = xs_dict_get(d, "value"); + /* safeguard from NULL values */ + v = xs_dict_get(d, "value"); + pronouns = v ? v : pronouns; break; } } -- cgit v1.2.3