Xpressive instrument may crash due to overflow
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
You can reproduce the crash by playing with the preset. If you don't get crashes, try changing the numbers in the O1 tab.
[crash3.xpf.zip](https://github.com/LMMS/lmms/files/5790127/crash3.xpf.zip)
The `positiveFraction` function defined in `ExprSynth.h` may return a unexpected value if the input value is out of the range of `int` but still finite. This result in overflows when casting to `int` and make `WaveValueFunction::operator()` crash.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start in ExprSynth.h with positiveFraction and trace how its result reaches WaveValueFunction::operator(). Reproduce the crash with crash3.xpf.zip, or by changing numbers in the O1 tab, then verify that finite inputs outside int range no longer cause an overflow or crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100