Skip to content

Conversation

DavisNT
Copy link
Contributor

@DavisNT DavisNT commented Oct 2, 2025

Refactor NotificationManager::Notification to use constructors. This reduces risk of coding errors (incl. buffer overflows) when creating NotificationManager::Notification and copying text to it.

Additionally fix a latent bug in ImmediateAlertService (include null terminator in the bytes copied and properly set size) using the constructor.

This PR supersedes #2159

This PR needs corresponding refactoring in InfiniSim: InfiniTimeOrg/InfiniSim#181

Refactor NotificationManager::Notification to use constructors.
This reduces risk of coding errors (incl. buffer overflows) when
creating NotificationManager::Notification and copying text to it.

And fix a latent bug in ImmediateAlertService (include null terminator
in the bytes copied and properly set size) using the constructor.
Copy link

github-actions bot commented Oct 2, 2025

Build size and comparison to main:

Section Size Difference
text 380100B -32B
data 944B 0B
bss 22520B -24B

Run in InfiniEmu

@DavisNT
Copy link
Contributor Author

DavisNT commented Oct 2, 2025

@mark9064, @NeroBurner Here is refactoring of NotificationManager::Notification with constructor. Can you please review this?

P.S. InfiniSim doesn't build, because it needs InfiniTimeOrg/InfiniSim#181

@mark9064 mark9064 added the maintenance Background work label Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Background work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants