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 - timidity.c, read_config_file(), array subscript is below array bounds
Summary: timidity.c, read_config_file(), array subscript is below array bounds
Status: RESOLVED FIXED
Alias: None
Product: SDL_sound
Classification: Unclassified
Component: everything (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Ryan C. Gordon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-13 12:01 UTC by Ozkan Sezer
Modified: 2011-06-15 10:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.