fix(sourcebundles): Only accept UTF-8 files#816
Merged
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #816 +/- ##
==========================================
+ Coverage 74.82% 74.89% +0.07%
==========================================
Files 63 63
Lines 15724 15744 +20
==========================================
+ Hits 11766 11792 +26
+ Misses 3958 3952 -6 |
Swatinem
approved these changes
Nov 2, 2023
Comment on lines
+1194
to
+1196
| let mut buf = String::new(); | ||
|
|
||
| if let Err(e) = file.read_to_string(&mut buf) { |
Contributor
There was a problem hiding this comment.
not too happy about allocating/copying another string here, but meh I guess its not too bad
Member
There was a problem hiding this comment.
Actually, it is quite bad if the file is big. Was doing some memory profiling with a 500 MB sourcemap (possibly this is larger than anything in the real world, but demonstrates what can go wrong in edge cases), and this line allocates 500 MB to store the file.
We should find a way to perform this verification without allocating memory for the entire file. Or, if this is not possible/practical, we should revert this change.
8 tasks
szokeasaurusrex
added a commit
to getsentry/sentry-cli
that referenced
this pull request
Jul 23, 2024
`symbolic-debuginfo` version 12.8.0 is the latest version excluding getsentry/symbolic#816, which caused a regression in `sentry-cli`. Fixes #2107
szokeasaurusrex
added a commit
to getsentry/sentry-cli
that referenced
this pull request
Jul 23, 2024
symbolic-debuginfo version 12.8.0 is the latest version excluding getsentry/symbolic#816, which caused a regression in sentry-cli. Fixes #2107
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.