Skip to content

zero fields before using them in udp multicast#56

Merged
thebentern merged 1 commit into
meshtastic:masterfrom
Jorropo:fix/6683
Apr 29, 2025
Merged

zero fields before using them in udp multicast#56
thebentern merged 1 commit into
meshtastic:masterfrom
Jorropo:fix/6683

Conversation

@Jorropo

@Jorropo Jorropo commented Apr 29, 2025

Copy link
Copy Markdown
Member

As a Go programer I expect all datatypes to have a default constructor initializing to a zero value, because in Go all new values always have a all zeros default value.

When I implemented ce9335d I forgot to initialize _fd & _quit to zero values.

This would have been caught by clang's UB sanitizers, we should make a *SAN build.

Needed for meshtastic/firmware#6683

As a Go programer I expect all datatypes to have a default constructor initializing to a zero value,
because in Go all new values always have a all zeros default value.

When I implemented ce9335d I forgot to initialize _fd & _quit to zero values.

This would have been caught by clang's UB sanitizers, we should make a *SAN build.

Needed for meshtastic/firmware#6683
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