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

Change Parse descriptor argument to string_view

Public commit record

What the developer wrote

Authored by Sjors Provoost

95/100 · Strong
Change Parse descriptor argument to string_view

Commit b3bf18f0bac0ffe18206ee20642e11264ba0c99d changed the function
signature from Parse(const std::string& descriptor,...) to
Parse(std::span<const char> descriptor,...).

Calling this new version of Parse with a string literal will trigger
a confusing "Invalid characters in payload" due to the trailing "\0".

Switch to string_view and add a test.

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a minor developer-facing bug in how Bitcoin Core parses text-based wallet descriptors. A recent code change had made the parser accept raw character spans, which accidentally included the hidden null terminator at the end of C++ string literals. That caused the parser to reject valid descriptors with a misleading 'Invalid characters in payload' error. The fix switches the public API to use std::string_view, which does not include the trailing null byte, and adds a regression test. It is not a consensus or network security issue.

Recommended action

No urgent action required. Treat as a normal code-quality/regression fix. Reviewers should verify the new test passes and that no other callers rely on the removed std::span<const char> signature.

Security signals we found

01

API usability fix that prevents misleading parse failures

02

Regression test added for null-byte edge case

03

No consensus, cryptography, or network layer changes

Risk score

Why this scored 20/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 2/15
Affected reach 3/15
Confidence 8/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.