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 NULL pointer access error in SynthDriverAudioStream #17607

Merged
merged 3 commits into from
Jan 12, 2025

Conversation

gexgd0419
Copy link
Contributor

Link to issue number:

None

Summary of the issue:

This is a fix for the NULL pointer access error introduced by #17592 and reported in this comment.

According to Microsoft's documentation, the pcbWritten parameter in ISequentialStream::Write and the plibNewPosition parameter in IStream::Seek can be NULL, in which case the function should ignore the output parameter and succeed.

Description of user facing changes

None

Description of development approach

ISequentialStream_RemoteWrite and IStream_RemoteSeek are changed to use the low level implementation. This makes checking the output parameter easier. Then, check if the output pointer is NULL before assigning the output value.

Testing strategy:

Known issues with pull request:

None

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

@gexgd0419 gexgd0419 requested a review from a team as a code owner January 10, 2025 07:55
@gexgd0419 gexgd0419 requested a review from seanbudd January 10, 2025 07:55
@burmancomp
Copy link
Contributor

Thanks @gexgd0419, works for me.

@seanbudd seanbudd merged commit 0d7aced into nvaccess:master Jan 12, 2025
5 checks passed
@github-actions github-actions bot added this to the 2025.1 milestone Jan 12, 2025
@gexgd0419 gexgd0419 deleted the sapi5-wasapi branch January 15, 2025 05:31
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.

4 participants