Skip to content

fix: uninitialised bytes in kqueue engine#71

Merged
Ratler merged 2 commits intoUndernetIRC:mainfrom
MrIron-no:fix/mem
Mar 21, 2026
Merged

fix: uninitialised bytes in kqueue engine#71
Ratler merged 2 commits intoUndernetIRC:mainfrom
MrIron-no:fix/mem

Conversation

@MrIron-no
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread ircd/engine_kqueue.c Outdated
engine_signal(struct Signal* sig)
{
struct kevent sigevent;
memset(&sigevent, 0, sizeof(sigevent));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrIron-no did you consider doing struct kevent sigevent = { 0 }; instead? I believe that would do the same thing, but at compile time, instead of runtime? I mean both work, but I think the assignment is a bit more C idiomatic.

Comment thread ircd/engine_kqueue.c Outdated
{
int i = 0;
struct kevent chglist[2];
memset(chglist, 0, sizeof(chglist));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the previous, but the value probably should be { { 0 } } instead.

@Ratler Ratler merged commit 1ecac43 into UndernetIRC:main Mar 21, 2026
@MrIron-no MrIron-no deleted the fix/mem branch March 21, 2026 21:35
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.

2 participants