Skip to content

Fix NULL pointer access error in SynthDriverAudioStream#17607

Merged
seanbudd merged 3 commits into
nvaccess:masterfrom
gexgd0419:sapi5-wasapi
Jan 12, 2025
Merged

Fix NULL pointer access error in SynthDriverAudioStream#17607
seanbudd merged 3 commits into
nvaccess:masterfrom
gexgd0419:sapi5-wasapi

Conversation

@gexgd0419

Copy link
Copy Markdown
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
Comment thread source/synthDrivers/sapi5.py Outdated
@burmancomp

Copy link
Copy Markdown
Contributor

Thanks @gexgd0419, works for me.

@seanbudd seanbudd merged commit 0d7aced into nvaccess:master Jan 12, 2025
@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