-
-
Notifications
You must be signed in to change notification settings - Fork 330
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: Check for NULL in binary image cache #3469
fix: Check for NULL in binary image cache #3469
Conversation
Properly validate the binary image name when converting it to an NSString to avoid crashes.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3469 +/- ##
=============================================
+ Coverage 88.962% 89.015% +0.052%
=============================================
Files 525 525
Lines 56682 56732 +50
Branches 20399 20410 +11
=============================================
+ Hits 50426 50500 +74
+ Misses 5333 5197 -136
- Partials 923 1035 +112
... and 39 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Couple questions on possible additional NULL checks we might need.
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.
LGTM
But, can this ever happen, the system calling binaryWasAdded but passing NULL?
I don't think so, but better to be safe than sorry. |
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8e76be4 | 1272.67 ms | 1286.38 ms | 13.71 ms |
e324230 | 1230.59 ms | 1248.20 ms | 17.61 ms |
7bc3c0d | 1259.74 ms | 1268.45 ms | 8.71 ms |
c5ff7b8 | 1226.68 ms | 1235.04 ms | 8.36 ms |
b9b0f0a | 1220.20 ms | 1229.27 ms | 9.06 ms |
f587451 | 1271.63 ms | 1275.90 ms | 4.27 ms |
326b7eb | 1252.86 ms | 1259.56 ms | 6.70 ms |
85b619d | 1252.51 ms | 1275.33 ms | 22.82 ms |
98752f3 | 1240.61 ms | 1259.80 ms | 19.18 ms |
4aea556 | 1222.94 ms | 1248.02 ms | 25.08 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
8e76be4 | 20.76 KiB | 427.66 KiB | 406.89 KiB |
e324230 | 22.85 KiB | 408.87 KiB | 386.02 KiB |
7bc3c0d | 20.76 KiB | 427.35 KiB | 406.59 KiB |
c5ff7b8 | 22.85 KiB | 414.80 KiB | 391.95 KiB |
b9b0f0a | 20.76 KiB | 434.94 KiB | 414.18 KiB |
f587451 | 20.76 KiB | 435.25 KiB | 414.49 KiB |
326b7eb | 20.76 KiB | 432.31 KiB | 411.55 KiB |
85b619d | 20.76 KiB | 426.11 KiB | 405.35 KiB |
98752f3 | 20.76 KiB | 435.09 KiB | 414.33 KiB |
4aea556 | 22.85 KiB | 411.66 KiB | 388.81 KiB |
📜 Description
Properly validate the binary image name when converting it to an NSString to avoid crashes.
💡 Motivation and Context
I came across this when looking at #3468.
💚 How did you test it?
Unit tests.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps