Skip to content

Conversation

@rpiadam
Copy link
Contributor

@rpiadam rpiadam commented Nov 17, 2025

redo

rpiadam and others added 9 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
- Add NULL check before irc_dictionary_add() calls
- Prevents crash when cache_file() returns NULL (file errors, empty files, memory allocation failures)
- Fixes potential crash in help file loading
- Add NULL check before irc_dictionary_add in load_help() to prevent crash when cache_file returns NULL
- Add NULL check for target_p in cache_links() to prevent crash when iterating global_serv_list
…3.0 compatibility

- Add missing sendto_channel_local_with_capability_butone declaration in send.h
- Fix OpenSSL 3.0 deprecation warnings by using OSSL_DECODER API for DH parameters
- Maintain backward compatibility with OpenSSL < 3.0 and LibreSSL
- Replace deprecated PEM_read_DHparams with modern EVP_PKEY/OSSL_DECODER API
@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