Skip to content

PlaudDeviceConnection._parseAudioChunk - RangeError crash#4546

Open
aaravgarg wants to merge 1 commit intomainfrom
fix/android-crash-plaud-parse-audio-range-error
Open

PlaudDeviceConnection._parseAudioChunk - RangeError crash#4546
aaravgarg wants to merge 1 commit intomainfrom
fix/android-crash-plaud-parse-audio-range-error

Conversation

@aaravgarg
Copy link
Collaborator

Summary

  • Add bounds check before payload.sublist(9, 9 + length) to prevent RangeError
  • Return null when payload is truncated or corrupted instead of crashing

Crash Stats

Test plan

  • Verify Plaud audio streaming still works correctly
  • Test with corrupted BLE payload (should return null, not crash)

🤖 Generated with Claude Code

Validate that payload has enough bytes before calling sublist to
prevent RangeError when payload is truncated or corrupted.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@aaravgarg aaravgarg requested a review from mdmohsin7 February 1, 2026 23:28
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

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