Skip to content

Conversation

@rpiadam
Copy link
Contributor

@rpiadam rpiadam commented Nov 17, 2025

No description provided.

rpiadam and others added 5 commits November 17, 2025 08:12
test the rehash now

Signed-off-by: Adam Hockley <[email protected]>
Fixed the order to match cache_user_motd() - stat() must be called
before free_cachefile() to avoid potential race conditions or crashes.
The stat() call should happen first to get file metadata, then free
and reload the cache.
- Fix use-after-free crash in free_cachefile (removed invalid rb_free on embedded data)
- Fix race condition in send_user_motd/send_oper_motd (use safe iterators, capture pointers locally)
- Fix unsafe pointer swap in cache_user_motd/rehash_omotd (load new cache first, then swap)
- Add proper error handling in cache_file (check malloc failures, file read errors, emptyline NULL check)
- Add error reporting to cache_user_motd (show errors in chat when /rehash motd fails)
- Preserve old MOTD if new one fails to load
- Fix same issues in rehash_rules
@rpiadam rpiadam closed this Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant