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

Add bounds check to resolve buffer over-read #1040

Merged
merged 2 commits into from
Jun 9, 2020

Commits on May 21, 2020

  1. Add bounds check to resolve buffer over-read

    Fixes JACoders#1038
    
    ofst over-reads past the end of the pSoundData buffer. Add a bounds check
    similar to S_CheckAmplitude() in codemp/client/snd_dma.cpp.
    
    JACoders@69800e8
    namtsui committed May 21, 2020
    Configuration menu
    Copy the full SHA
    4472fa8 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2020

  1. Doppler effect sound effects cause buffer overread

    Sounds that use dopplerScale (e.g., rocket launcher) exhibited a buffer
    over-read. S_PaintChannelFrom16's ofst reads past end of sfx->pSoundData buffer.
    To resolve this, take dopplerScale increments of ofst into consideration when
    calculating count, which controls the loop for ofst.
    
    Resolves: JACoders#1038
    See also: JACoders@69800e8
    namtsui committed May 22, 2020
    Configuration menu
    Copy the full SHA
    27aa4aa View commit details
    Browse the repository at this point in the history