AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 13 Bitcoin

perf(core): drop nanopb error strings from bootloader

Public commit record

What the developer wrote

Authored by tychovrahe

85/100 · Strong
perf(core): drop nanopb error strings from bootloader

nanopb's error message strings are linked into the bootloader image, but
nothing reads `pb_(i|o)stream_t::errmsg`. Defining PB_NO_ERRMSG removes
them along with the PB_SET_ERROR code paths.

The three `.errmsg = NULL` initializers in codec_v1.c go away with the
struct field. Dropping them rather than #ifdef-guarding them keeps the
code correct either way, since designated initializers zero the rest.

bootloader_ci is untouched: it has its own messages.c and build.rs.

Recovers 976 B of flash. T3T1 bootloader free space (--production):
28 B -> 1004 B.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

[no changelog]
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change removes unused error-message text from the bootloader's copy of the nanopb library to free up about 1 kB of flash storage. The bootloader never looked at these error strings anyway, so the change is a size optimization with no security effect.

Recommended action

No security action required; treat as a normal size-optimization change.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 13/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 9/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.