irssi/src/fe-common/irc
moirhira b61f546588 fe-dcc-chat: fix segfault in dcc_closed() when window already destroyed
During shutdown, query_destroy() fires before dcc_close(), leaving
the DCC record pointing at a freed window. dcc_closed() then calls
printformat() with NULL as the window item, which causes a NULL
dereference in store_lineinfo_tmp() at textbuffer-formats.c:148.

Fix by looking up the query window and passing its name string
to printformat(), falling back to NULL which safely prints to
the server window. Also removes dead code where sender was
allocated but never used in the printformat call.

Reproducer: /dcc chat <nick>, then /quit
Tested against both a local server and irc.libera.chat.
2026-04-27 16:00:50 +01:00
..
dcc fe-dcc-chat: fix segfault in dcc_closed() when window already destroyed 2026-04-27 16:00:50 +01:00
notifylist run meson formatter 2026-01-25 22:07:44 +01:00
fe-cap.c Use full paths to includes 2019-05-01 22:08:45 +02:00
fe-common-irc.c remove deprecated defines 2022-02-20 17:33:36 +01:00
fe-ctcp.c initialise memory in ctcp ping reply 2025-03-24 08:54:01 +01:00
fe-events-numeric.c fix /ban command 2024-04-12 22:55:20 +02:00
fe-events.c use account-notify capability 2019-08-15 17:30:38 +02:00
fe-irc-channels.c fix /ban command 2024-04-12 22:55:20 +02:00
fe-irc-channels.h fix /ban command 2024-04-12 22:55:20 +02:00
fe-irc-commands.c fix /ban command 2024-04-12 22:55:20 +02:00
fe-irc-messages.c Fix logic in how own actions are printed for other protocols 2023-05-04 23:10:27 +02:00
fe-irc-queries.c restore irc bound queries 2022-03-16 00:02:29 +01:00
fe-irc-server.c Update /server syntax line 2022-09-12 14:07:05 +02:00
fe-irc-server.h update include guard names 2019-05-01 22:22:22 +02:00
fe-ircnet.c Use full paths to includes 2019-05-01 22:08:45 +02:00
fe-modes.c correct wrong function prefixes: gslist -> i_slist 2021-01-07 10:14:34 +01:00
fe-netjoin.c correct wrong function prefixes: gslist -> i_slist 2021-01-07 10:14:34 +01:00
fe-netsplit.c fe-netsplit: fix nickname truncation to avoid trailing comma-space 2025-11-23 15:15:24 +02:00
fe-sasl.c Use full paths to includes 2019-05-01 22:08:45 +02:00
fe-whois.c better account tracking 2021-02-26 14:19:33 +01:00
irc-completion.c Use full paths to includes 2019-05-01 22:08:45 +02:00
meson.build run meson formatter 2026-01-25 22:07:44 +01:00
module-formats.c order 2023-05-25 11:36:25 +02:00
module-formats.h properly format listmodes and their timestamps 2023-03-26 16:36:27 -05:00
module.h Use full paths to includes 2019-05-01 22:08:45 +02:00