Skip to content

Fix buffer overflow in device ID string causing crash on HA discovery - #766

Merged
technyon merged 1 commit into
technyon:masterfrom
spinthil:master
Jul 27, 2026
Merged

Fix buffer overflow in device ID string causing crash on HA discovery#766
technyon merged 1 commit into
technyon:masterfrom
spinthil:master

Conversation

@spinthil

Copy link
Copy Markdown
Contributor

Fix:

  • Zero-initialize mac[8] so the ID is derived only from the real MAC bytes.
  • Enlarge _nukiHubUidString from 20 to 21 bytes to hold a full uint64_t.

Description:

Related issue (if applicable): fixes #765

Checklist:

  • The pull request is done against the latest master branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

Fix:
- Zero-initialize `mac[8]` so the ID is derived only from the real MAC bytes.
- Enlarge `_nukiHubUidString` from 20 to 21 bytes to hold a full uint64_t.
@technyon

Copy link
Copy Markdown
Owner

Good catch, thank you

@technyon
technyon merged commit f819e9d into technyon:master Jul 27, 2026
14 checks passed
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.

Crash/bootloop on Waveshare ESP32-C5-WROOM-1 when Home Assistant discovery is enabled

2 participants