chore: bump cUR and k_quirc - #138
Merged
Merged
Conversation
cUR and k_quirc now mark their failure-signalling functions warn_unused_result and build with -Werror=unused-result. Kern's call sites into both already checked every return, so adopting the same attribute on Kern's own API was free to try: KERN_WARN_UNUSED_RESULT in main/utils/attributes.h, applied to 165 declarations across core/, qr/ and utils/. It found 42 discarded results. The one that mattered: pin_is_configured() returns false when the module is not initialized, and session_lock_boot_gate() routes that straight to unlock_finished(). pin_init()'s result was dropped in both app_main() and the simulator, so a failed init booted a device that has a PIN set straight past its own PIN gate. Both now fail closed. pin_wipe_all() discarded settings_reset_all(), storage_init() and storage_wipe_flash(), then called esp_restart() regardless, making a failed anti-brute-force wipe indistinguishable from a clean one. Each step now logs and the flash wipe retries once. Its esp_err_t return was fiction since the function never returns, so it is void now. storage_sanitize_id() formatted an uninitialised hash buffer when crypto_sha256() failed, putting stack bytes into a name shown in the UI and used to build a filename. Also handled: pin_remove() at three sites and pin_set_max_failures() reported success the storage had not accepted, registry_remove() and registry_set_label() desynced the UI from the registry, registry_add_from_string() silently dropped autoloaded descriptors, and settings.c now logs every failed write once with the key that could not be stored. Where the caller genuinely cannot act the attribute is left off rather than worked around at the call site, documented in settings.h and encoder.h: settings_set_* persist a preference already applied in session, and qr_create_optimal() returns a parent-owned widget that leaks nothing when discarded.
odudex
force-pushed
the
chore--bump-cUR-and-k_quirc
branch
from
August 14, 2026 21:04
e2cd6d0 to
d00a337
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several memory and logic fixes in both submodules