-
-
Notifications
You must be signed in to change notification settings - Fork 77
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(sourcebundles): Only accept UTF-8 files #816
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 |
let mut buf = String::new(); | ||
|
||
if let Err(e) = file.read_to_string(&mut buf) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not too happy about allocating/copying another string here, but meh I guess its not too bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
`symbolic-debuginfo` version 12.8.0 is the latest version excluding getsentry/symbolic#816, which caused a regression in `sentry-cli`. Fixes #2107
symbolic-debuginfo version 12.8.0 is the latest version excluding getsentry/symbolic#816, which caused a regression in sentry-cli. Fixes #2107
No description provided.