Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: No need in the Builder::add_resource taking ownership of the resource stream; use reference instead #479

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

brogdonm
Copy link
Contributor

@brogdonm brogdonm commented Jun 6, 2024

Changes in this pull request

Give a narrative description of what has been changed.

Previously, the Builder::add_resource method takes ownership of the resource stream. This is unnecessary and taking the stream as a reference allows for the stream to be used over and over again between calls (especially in long running processes).

The method also required the stream to be seekable, but this isn't necessary either as the stream is read into a memory buffer.

Checklist

  • This PR represents a single feature, fix, or change.
  • All applicable changes have been documented.
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@brogdonm
Copy link
Contributor Author

@mauricefisher64 @gpeacock The vulnerability failure appears after merging the latest main into this branch.

@scouten-adobe scouten-adobe changed the title No need in the Builder::add_resource taking ownership of the resource stream; use reference instead fix: No need in the Builder::add_resource taking ownership of the resource stream; use reference instead Oct 7, 2024
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.

1 participant