Skip to content

Fix memory leak from goRawXdr not being freed#16

Merged
cjonas9 merged 1 commit intomainfrom
fix-decode-memory-leak
Feb 26, 2026
Merged

Fix memory leak from goRawXdr not being freed#16
cjonas9 merged 1 commit intomainfrom
fix-decode-memory-leak

Conversation

@cjonas9
Copy link
Contributor

@cjonas9 cjonas9 commented Feb 24, 2026

What

Fixes a memory leak resulting from goRawXdr not being freed in xdr2json/conversion.go::Decode(). Removed unnecessary scoping to match patterns in stellar/stellar-rpc/internal/xdr2json/conversion.go and reduce ambiguity.

Why

This caused a leak of size len(goRawXdr), which presents a vulnerability.

Known limitations

N/A

@cjonas9 cjonas9 requested review from a team, chowbao and Copilot and removed request for Copilot February 24, 2026 20:57
@cjonas9 cjonas9 added the bug Something isn't working label Feb 24, 2026
@cjonas9 cjonas9 merged commit e286cc5 into main Feb 26, 2026
14 of 18 checks passed
@cjonas9 cjonas9 deleted the fix-decode-memory-leak branch February 26, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants