We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3898 - multiple timidity fixes
Summary: multiple timidity fixes
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-21 09:36 UTC by Ozkan Sezer
Modified: 2017-10-21 09:53 UTC (History)
0 users

See Also:


Attachments
patch01 (1.01 KB, patch)
2017-10-21 09:37 UTC, Ozkan Sezer
Details | Diff
patch02 (1.23 KB, patch)
2017-10-21 09:38 UTC, Ozkan Sezer
Details | Diff
patch03 (2.23 KB, patch)
2017-10-21 09:38 UTC, Ozkan Sezer
Details | Diff
patch04 (8.70 KB, patch)
2017-10-21 09:39 UTC, Ozkan Sezer
Details | Diff
patch05 (2.87 KB, patch)
2017-10-21 09:41 UTC, Ozkan Sezer
Details | Diff
patch06 (2.43 KB, patch)
2017-10-21 09:41 UTC, Ozkan Sezer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2017-10-21 09:36:48 UTC
Attached patches apply fixes to timidity.
Comment 1 Ozkan Sezer 2017-10-21 09:37:33 UTC
Created attachment 3015 [details]
patch01

load_instrument(): Close the file before returning in error cases.
Comment 2 Ozkan Sezer 2017-10-21 09:38:12 UTC
Created attachment 3016 [details]
patch02

fix a few clang -Wempty-body warnings.
Comment 3 Ozkan Sezer 2017-10-21 09:38:55 UTC
Created attachment 3017 [details]
patch03

instrum.c (load_instrument): Fix shadowing warnings due to reuse of variables i and tmp.
Comment 4 Ozkan Sezer 2017-10-21 09:39:29 UTC
Created attachment 3018 [details]
patch04

allocate the sp data with two additional samples in instrum.c,
initialize the extra to 0. apply the timidity-0.2i-bugfix.pat
patch found at the onicos.com site.  apply a lot of resampler
fixes.  fixes all the valgrind warnings reported in bug #3892.
Comment 5 Ozkan Sezer 2017-10-21 09:41:02 UTC
Created attachment 3019 [details]
patch05

resample.c (rs_plain): Bug fixed about PRECALC_LOOPS counter.
Original form: i = (le - ofs) / incr + 1;           (Original)
Fixed form:    i = (le - ofs + incr - 1) / incr;    (Correct)
[ from timidity++ v2.7.0-to-v2.8.0 diff, 1999-11-19  Masanao Izumo <mo@goice.co.jp> ]
Comment 6 Ozkan Sezer 2017-10-21 09:41:43 UTC
Created attachment 3020 [details]
patch06

further resampler fixes to avaid crashes (e.g. in rs_loop) with broken situations.
Comment 7 Sam Lantinga 2017-10-21 09:53:56 UTC
Added, thanks!