Comments (4)
I've been fuzzing libmodplug to find bugs in #57 and, despite finding one bug in that, I've mostly found a lot of bugs elsewhere instead. Particularly, there is some pretty bad cleanup and bounds checking in the MIDI loader, which is almost certainly the cause of this crash. There is also at least one place where the loader can return without clearing the reentrancy flag, leading to indefinite hangs. Whenever I get a run that hits over 1m executions I'll get my collection of fixes ready to submit as a patch (should be soon).
Edit: it's here #58. I haven't confirmed that this patch fixed it on the OP's end, but I added the input file to the corpus and it hasn't crashed.
from libmodplug.
The midi files support (load_mid, load_pat, load_abc) in libmodplug
is bad and should die. I specifically disable it in my fork, SDL_sound
removed it in its fork and went back to timidity.
from libmodplug.
Many of the crash bugs and slow loads I've encountered fuzzing libmodplug so far are from the MIDI loader. This loader does not seem to have been written with stability or performance in mind.
IMO MIDI support makes sense from the perspective of importing the data into a tracker for creating a module, but not so much for playback (as there are much better players).
edit: this pretty much sums up the code quality of the MIDI loaders from what I've seen so far.
static BYTE pat_gm_used[MAXSMP];
int pat_numsmp()
{
return strlen((const char *)pat_gm_used);
}
int pat_numinstr(void)
{
return strlen((const char *)pat_gm_used);
}
from libmodplug.
This should be fixed via #66 / #67 and maybe #76.
from libmodplug.
Related Issues (20)
- Crash when reading a specific file HOT 4
- Public Domain declaration has problems HOT 2
- Seeking to invalid position doesn't report failure
- LSB/MSB byte order on ppc/linux (powerpc, 32bit) HOT 2
- Documentation? HOT 1
- Add support for MAD* files (MADH/MADfg/MADI/MADK) HOT 2
- AMF Player (ReadAMF?) can't play correctly .amf files from Cannon Fodder 2 soundtrack
- Midi music get wrong duration && wrong tone HOT 1
- Please publish a git tag for the 0.8.9.0 release HOT 1
- Having trouble looping sounds HOT 1
- Missing git version tags HOT 1
- 0.8.9.0: compile time warnings HOT 9
- release early, release often
- [Feature Request] Mugician and Future Composer support HOT 1
- unable to play some s3m file HOT 1
- How to convert a "Set Global Volume" mod function to ULT function? HOT 10
- S3M requires 6 bytes after last pattern before end of file HOT 1
- [Feature Request] PlaySID v2.2+ (AMIGA) sidtune support
- Enhancing libmodplug's playback support for MIDI files and other "instrument-free" music formats
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmodplug.