Skip to content

HYRAX-2315, build the XMLWriter with the right encoding from the star… - #1449

Merged
kyang2014 merged 3 commits into
masterfrom
hyrax-2315
Oct 30, 2026
Merged

kyang2014 merged 3 commits into
masterfrom
hyrax-2315

Conversation

@kyang2014

@kyang2014 kyang2014 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

…t to avoid the double-free issue in the current code

Description

Reference ticket: HYRAX-2315

Fix the potential double free bug when initializing the XML with a specific encoding method.

Tasks

  • Ticket exists and is linked in title

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@jgallagher59701 jgallagher59701 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but can you explain to me how this caused a double free?

@kyang2014

Copy link
Copy Markdown
Collaborator Author

Approved, but can you explain to me how this caused a double free?
With the previous implementation, the XMLWriter's destructor will be called twice. The first is at the end of the if block.

I listed the details at the comments of https://bugs.earthdata.nasa.gov/browse/HYRAX-2315.

@kyang2014
kyang2014 merged commit f2ab84b into master Oct 30, 2026
5 checks passed
@kyang2014
kyang2014 deleted the hyrax-2315 branch October 30, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants