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

bookkeeper: fix printing of bad JSON results.

Public commit record

What the developer wrote

Authored by Rusty Russell

68/100 · Adequate
bookkeeper: fix printing of bad JSON results.

I noticed this in the logs:

```
listinvoices: description/bolt11/bolt12 not found (

{"jsonrpc":"2)
```

And we make the same formatting mistake in several places.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a logging bug in the bookkeeper plugin where error messages printed only the start of a JSON response instead of the intended snippet. The code used the wrong pointer offset, so log lines showed garbage like '{"jsonrpc":"2' rather than the relevant data. It is a cosmetic/log-quality fix with no direct security impact.

Recommended action

No security action required. Treat as a normal code-quality/logging fix. Reviewers may optionally verify that no other '%.*s' JSON-token prints in the codebase have the same offset bug.

Security signals we found

01

No security-relevant code path modified

02

Fixes diagnostic log formatting only

03

No input validation, memory allocation, or cryptographic changes

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 2/15
Confidence 9/10
Evidence quality 5/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.