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

Fix crashes and cleanup warnings #28

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

heftig
Copy link

@heftig heftig commented Apr 26, 2019

I'm familiar with C but not with C++. I massaged the code (with some help from valgrind and asan) until it no longer crashed compressing the soundfonts I had, which are:

  • KOR Soundfont - GM Complete 4.51.sf2
  • OmegaGMGS2.sf2

I also cleaned up some warnings which appeared with -Wall. You might want to cherry-pick one or more of the individual commits even if you reject the PR as a whole.

Avoids having an arbitrarily sized, big array on the stack. Also avoids
an extra copy.
Avoids stack overflows. The compressed sample data is appended to a
vector, avoiding constraining the size arbitrarily.
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.

1 participant