8-bit stereo WAV files corrupt the heap (saturnringlib/srl_sound.hpp:680)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cpp
- Domain
- audio-video-rtc
Research direction
The bug is in the stereo split loop in saturnringlib/srl_sound.hpp near line 680, which writes the right channel to data[dataSize + sample] and loops to dataSize/2. Read how dataSize and the buffer allocation are computed for 8-bit stereo WAVs, then check the index and loop bound against the real sample count. Done when a short 8-bit stereo WAV loads without writing past the buffer, which you can confirm with a small test file or a bounds-checking build.
Written by the indexing model from the issue text.
Description
- What this is: The same loader splits stereo samples into a left half and a right half.
- Problem: The right channel is written to data[dataSize + sample], which is past the end of the buffer. The loop also runs to dataSize/2, the padded size, so short files are read past their end.
- Fix: Write to data[dataSize/2 + sample] and loop to size >> 1, the real sample count.
- Dominant language
- C++
- Stars
- 90
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ReyeMe/SaturnRingLib
-
bug required hardware test
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ReyeMe/SaturnRingLib#148 ·
-
bug required hardware test
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ReyeMe/SaturnRingLib#147 ·
-
bug required hardware test
Difficulty 1/5 Under an hour Newbie friendliness 82/100
ReyeMe/SaturnRingLib#145 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ReyeMe/SaturnRingLib#144 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ReyeMe/SaturnRingLib#149 ·
All issues in ReyeMe/SaturnRingLib
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/tensorstore#306 ·
-
comp-formats
Difficulty 2/5 Half a day Newbie friendliness 64/100
ClickHouse/ClickHouse#131694 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ETSInitiative/PETSIRD#243 ·
Maintainers usually reply within 1 day
-
[BUG][Ascend][AscendC] Scalar FP8 arithmetic stored to UB emits ".data" on a float and fails deviceOpenascend bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day