Files
cproof/src/ui
Jabber Developer 2fc7f3d672
Some checks failed
CI Code / Check spelling (pull_request) Successful in 53s
CI Code / Check coding style (pull_request) Successful in 1m11s
CI Code / Linux (debian) (pull_request) Failing after 2m58s
CI Code / Linux (arch) (pull_request) Failing after 3m11s
CI Code / Linux (ubuntu) (pull_request) Failing after 3m10s
CI Code / Code Coverage (pull_request) Successful in 2m46s
fix(ai): validate aiwin pointer to prevent UAF when window closed
Prevent use-after-free in the AI request worker thread when the user
closes the AI window during the 60-second HTTP request timeout. Without
this fix, the worker may dereference a dangling pointer and crash or
exhibit undefined behavior.

The _ai_request_thread function in ai_client.c previously cast user_data
to ProfAiWin* and used it directly without verifying the window was still
alive. Added wins_ai_exists() to iterate through all AI windows and check
if the pointer is still valid before use.

Safety:
- wins_ai_exists() iterates all AI windows (handles multiple AI windows)
- Worker skips UI update if window was freed, just cleans up
- Logs warning when dangling pointer is detected
2026-05-01 17:03:47 +00:00
..
2026-05-01 12:56:57 +00:00
2023-08-31 23:14:02 +02:00
2025-03-12 10:15:39 +01:00
2025-03-27 20:06:38 +01:00
2020-09-04 12:55:20 +02:00
2019-11-13 12:11:05 +01:00
2020-07-07 14:18:57 +02:00
2025-03-12 10:09:41 +01:00
2023-12-12 18:26:21 +01:00
2023-08-31 23:14:02 +02:00