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: Use strlcpy to save session replay info path #4740

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

Conversation

brustolin
Copy link
Contributor

📜 Description

Use safer strlcpy and add room for null-terminator when saving sr path for info file.

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link

github-actions bot commented Jan 22, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1232.22 ms 1252.82 ms 20.59 ms
Size 22.31 KiB 775.15 KiB 752.83 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
279841c 1231.41 ms 1245.65 ms 14.24 ms
504730d 1228.63 ms 1248.12 ms 19.49 ms
c319795 1256.18 ms 1266.87 ms 10.69 ms
2affdbd 1212.78 ms 1236.60 ms 23.82 ms
9e6665f 1233.33 ms 1257.14 ms 23.81 ms
39b1c35 1244.71 ms 1248.60 ms 3.89 ms
f2daa68 1211.14 ms 1217.53 ms 6.39 ms
af1f4dd 1207.33 ms 1230.04 ms 22.71 ms
3396be1 1242.29 ms 1254.41 ms 12.12 ms
31ac438 1216.17 ms 1242.68 ms 26.51 ms

App size

Revision Plain With Sentry Diff
279841c 22.84 KiB 403.19 KiB 380.35 KiB
504730d 21.58 KiB 714.88 KiB 693.30 KiB
c319795 20.76 KiB 431.99 KiB 411.22 KiB
2affdbd 22.85 KiB 411.37 KiB 388.52 KiB
9e6665f 22.84 KiB 403.52 KiB 380.67 KiB
39b1c35 22.85 KiB 408.88 KiB 386.03 KiB
f2daa68 21.58 KiB 418.40 KiB 396.82 KiB
af1f4dd 22.85 KiB 414.71 KiB 391.86 KiB
3396be1 22.30 KiB 730.07 KiB 707.77 KiB
31ac438 20.76 KiB 393.37 KiB 372.61 KiB

Previous results on branch: fix/sr-strlcpy

Startup times

Revision Plain With Sentry Diff
b47139a 1224.17 ms 1237.37 ms 13.20 ms

App size

Revision Plain With Sentry Diff
b47139a 22.31 KiB 775.15 KiB 752.84 KiB

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.205%. Comparing base (5bcc0d8) to head (879121f).

Files with missing lines Patch % Lines
Sources/Sentry/SentrySessionReplaySyncC.c 71.428% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4740       +/-   ##
=============================================
+ Coverage   91.118%   91.205%   +0.087%     
=============================================
  Files          623       623               
  Lines        72484     72499       +15     
  Branches     25773     26415      +642     
=============================================
+ Hits         66046     66123       +77     
+ Misses        6343      6276       -67     
- Partials        95       100        +5     
Files with missing lines Coverage Δ
Sources/Sentry/SentrySessionReplaySyncC.c 72.602% <71.428%> (-6.086%) ⬇️

... and 23 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bcc0d8...879121f. Read the comment docs.

@brustolin brustolin changed the title Use strlcpy to save session replay info path Fix: Use strlcpy to save session replay info path Jan 22, 2025
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.

3 participants