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

TDA-3417: crash in socket #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ValeriiIamkovyi
Copy link
Collaborator

@ValeriiIamkovyi ValeriiIamkovyi commented Oct 25, 2024

Summary

I've made several improvements to prevent crashes in this method:

  • Instead of converting Data to NSData and back, we now work directly with Data. The conversion was unnecessary and could introduce memory management issues. The Data append method is used for better efficiency and safety.

  • Replaced UnsafeRawPointer with withUnsafeBytes to safely access the raw pointer, avoiding potential memory issues.

Code review check list

  • Comments - Fundamental architecture/workflows and non-obvious/quirky bits are commented
  • Accessibility - Tested via accessibility inspector
  • Accessibility - Tested via device's voice over
  • Generates no new warnings (Including SwiftLint)
  • Has tests

Ticket

TDA-3417

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