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 1228

Summary: timidity.c, read_config_file(), array subscript is below array bounds
Product: SDL_sound Reporter: Ozkan Sezer <sezeroz>
Component: everythingAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Ryan C. Gordon <icculus>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: Linux   

Description Ozkan Sezer 2011-06-13 12:01:10 UTC
With SDL_sound configured with CFLAGS="-Wall -O2", this scary warning shows up:

timidity.c: In function 'read_config_file':
timidity.c:111: warning: array subscript is below array bounds

Looking at the code, words is set to -1 when "#extensions" is hit and then w[words] is processed like nothing unusual has happened.

(I am still waiting for details from a user about a segfault in read_config_file() but I suspect this particular part of timidity.c may be the culprit.)
Comment 1 Ryan C. Gordon 2011-06-15 10:40:34 UTC
I think this is fixed now: hg changeset 62f763761507 for the stable-1.0 branch, hg changeset 52518db6aa46 for the development branch.

--ryan.